From: Junio C Hamano Date: Fri, 19 Apr 2024 15:48:56 GMT Subject: Re: [PATCH v2 5/7] update-ref: add support for symref-create Message-ID: In-Reply-To: Patrick Steinhardt writes: >> + if (!new_ref) >> + die("symref-create %s: missing ", refname); >> + if (read_ref(new_ref, NULL)) >> + die("symref-create %s: invalid ", refname); > > This restricts the creation of dangling symrefs, right? I think we might > want to lift this restriction, in which case we can eventually get rid > of the `create_symref` callback in ref backends completely. True. >> @@ -2609,6 +2609,27 @@ static int lock_ref_for_update(struct files_ref_store *refs, >> } >> } >> >> + if (update->flags & REF_SYMREF_UPDATE && update->new_ref) { > > Let's add braces around `(updaet->flags & REF_SYMREF_UPDATE)` to make > this easier to read. Yup, the language may not require the extra pair of parentheses, but human eyes are helped by them. Thanks, again and as always, for carefully reading.