Thread (1 message) 1 message, 1 author, 2024-02-07

Re: [PATCH v3 5/7] refs: add pseudorefs array and iteration functions

From: Junio C Hamano <hidden>
Date: 2024-02-07 22:03:02

Kousik Sanagavarapu [off-list ref] writes:
Andy Koppe [off-list ref] wrote:
...
quoted
+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@gmail.com/T/ (local)
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help