On Fri, Apr 12, 2024 at 11:59 AM Karthik Nayak <karthik.188@xxxxxxxxx> wrote: > > From: Karthik Nayak <karthik.188@xxxxxxxxx> > > Similar to the previous commit, add 'symref-delete' to allow deletions > of symbolic refs in a transaction via the 'git-update-ref' command. The > 'symref-delete' command can when given with an <old-ref>, deletes the > provided <ref> only when it points to <old-ref>. I have a similar question as with the previous patch about what happens if <old-ref> looks like an oid and <ref> is a regular ref pointing to it. > Signed-off-by: Karthik Nayak <karthik.188@xxxxxxxxx> > diff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt > index 749aaa7892..ef22a1a2f4 100644 > --- a/Documentation/git-update-ref.txt > +++ b/Documentation/git-update-ref.txt > @@ -65,6 +65,7 @@ performs all modifications together. Specify commands of the form: > create SP <ref> SP <new-oid> LF > delete SP <ref> [SP <old-oid>] LF > verify SP <ref> [SP <old-oid>] LF > + symref-delete SP <ref> [SP <old-ref>] LF > symref-verify SP <ref> [SP <old-ref>] LF > option SP <opt> LF > start LF > @@ -87,6 +88,7 @@ quoting: > create SP <ref> NUL <new-oid> NUL > delete SP <ref> NUL [<old-oid>] NUL > verify SP <ref> NUL [<old-oid>] NUL > + symref-delete SP <ref> [NUL <old-ref>] NUL > symref-verify SP <ref> [NUL <old-ref>] NUL > option SP <opt> NUL > start NUL Also I wonder if there is a test where <old-ref> is an empty string, so where: symref-delete SP <ref> SP LF or: symref-delete SP <ref> NUL NUL are used?