Re: [PATCH v2 04/10] refs: use ref_namespaces for replace refs base
From: Josh Steadmon <hidden>
Date: 2022-08-03 22:38:57
From: Josh Steadmon <hidden>
Date: 2022-08-03 22:38:57
On 2022.07.29 19:29, Derrick Stolee via GitGitGadget wrote:
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)