Thread (59 messages) 59 messages, 8 authors, 2022-09-09

Re: [PATCH v2 04/10] refs: use ref_namespaces for replace refs base

From: Josh Steadmon <hidden>
Date: 2022-08-03 22:38:57

On 2022.07.29 19:29, Derrick Stolee via GitGitGadget wrote:
quoted hunk ↗ jump to hunk
diff --git a/log-tree.c b/log-tree.c
index d0ac0a6327a..bb80f1a94d2 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -141,10 +141,12 @@ static int add_ref_decoration(const char *refname, const struct object_id *oid,
 	enum object_type objtype;
 	enum decoration_type deco_type = DECORATION_NONE;
 	struct decoration_filter *filter = (struct decoration_filter *)cb_data;
+	const char *git_replace_ref_base;
 
 	if (filter && !ref_filter_match(refname, filter))
 		return 0;
 
+	git_replace_ref_base = ref_namespaces[NAMESPACE_REPLACE].ref;
Is there a reason not to initialize this as soon as we declare it?

 	if (starts_with(refname, git_replace_ref_base)) {
 		struct object_id original_oid;
 		if (!read_replace_refs)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help