Re: [PATCH v2 3/3] ref-filter: populate symref from iterator
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 1, 2024, 16:43 UTC
- Message-ID
- <xmqq4j84w5vu.fsf@gitster.g>
- In-Reply-To
- <3e147e7d850773f44b48d1b86e89aef1415a0ccd.1722524334.git.gitgitgadget@gmail.com>
"John Cai via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 6 quoted lines
> @@ -2852,6 +2852,8 @@ static struct ref_array_item *apply_ref_filter(const char *refname, const struct > ref->commit = commit; > ref->flag = flag; > ref->kind = kind; > + if (flag & REF_ISSYMREF) > + ref->symref = xstrdup_or_null(referent);
The same reaction as [1/3]. Doesn't the null-ness of referent convey the same information as the ISSYMREF bit in flag? IOW, can't we do this assignment unconditionally?