Re: [PATCH v3 0/8] refs: add symref support to 'git-update-ref'
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Apr 25, 2024, 06:40 UTC
- Message-ID
- <Zin67FKk6XXOotQh@tanuki>
- In-Reply-To
- <CAOLa=ZRk8QR4qkbkRm6AirapdrAqz6bG-tXfY3zRQU_9XkJM1Q@mail.gmail.com>
On Wed, Apr 24, 2024 at 09:25:27AM -0700, Karthik Nayak wrote:
> Jeff King <peff@peff.net> writes: > > On Tue, Apr 23, 2024 at 11:28:10PM +0200, Karthik Nayak wrote:
[snip]
Show 13 quoted lines
> Also on a sidenote, it's worth considering that with the direction of
> [2], we could also extrapolate to introduce {verify, update, create,
> delete} v2, which support both symrefs and regular refs. But require
> explicit types from the user:
>
> update-v2 SP <ref> NUL (oid <new-oid> | ref <new-target>) NUL
> [(oid <old-oid> | ref <old-target>)] NUL
> create-v2 SP <ref> NUL (oid <new-oid> | ref <new-target>) NUL
> delete-v2 SP <ref> NUL [(oid <old-oid> | ref <old-target>)] NUL
> verify-v2 SP <ref> NUL [(oid <old-oid> | ref <old-target>)] NUL
>
> This is similar to the v3 patches I've currently sent out, in that it
> would also allow cross operations between regular refs and symrefs.One could put this new syntax behind a feature flag to avoid the "-v2" suffixes, e.g. `git update-ref --with-symrefs`. But I'm not sure whether this would be beneficial.
Patrick