Kousik Sanagavarapu <five231003@xxxxxxxxx> writes: > Andy Koppe <andy.koppe@xxxxxxxxx> wrote: > ... >> +static const char *const pseudorefs[] = { >> + "FETCH_HEAD", >> + "ORIG_HEAD", >> + "MERGE_HEAD", >> + "REBASE_HEAD", >> + "CHERRY_PICK_HEAD", >> + "REVERT_HEAD", >> + "BISECT_HEAD", >> + "AUTO_MERGE", >> +}; >> + >> struct ref_namespace_info ref_namespace[] = { >> [NAMESPACE_HEAD] = { >> .ref = "HEAD", >> @@ -1549,6 +1564,33 @@ int head_ref(each_ref_fn fn, void *cb_data) >> return refs_head_ref(get_main_ref_store(the_repository), fn, cb_data); >> } > > The first thing that popped up in my head was "Should we somehow use > is_pseudoref_syntax() instead of manually listing these?" (although I > read in this thread later that Junio was okay with the listing) but then ... > > I thought I saw something similar in some other thread (which entered > the mailing list much after this patch series was submitted) ... > > https://lore.kernel.org/git/20231221170715.110565-2-karthik.188@xxxxxxxxx/T/ We are halting Karthik's topic to rethink its UI for now, but your point stands. We should use a unified definition of what pseudorefs there are across the codebase for consistency, and Karthik's topic would be a better place to do so. Andy, let me drop this topic for now from my tree, and let's wait until Karthik's "iterate over all refs" topic solidifies, at which time an updated iteration (v4?) of this topic hopefully can build on top of it. Thanks.