Re: [PATCH v4 0/5] builtin/refs: add ability to write references
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 6, 2026, 14:57 UTC
- Message-ID
- <xmqqtsqcb1xv.fsf@gitster.g>
- In-Reply-To
- <20260706-pks-refs-writing-subcommands-v4-0-d51f6ce7f830@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 27 quoted lines
> Reference-related functionality in Git is currently spread across many > different commands: git-update-ref(1), git-for-each-ref(1), > git-show-ref(1), git-pack-refs(1) and git-symbolic-ref(1). This makes it > hard for users to discover what functionality we have available to work > with references. > > We have thus started to consolidate this functionality into git-refs(1), > which is a toolbox of everything related to references. Until now, the > command doesn't handle functionality of git-update-ref(1). > > This patch series backfills most of the functionality by introducing > three new commands: > > - `git refs delete` to delete references. This is the equivalent of > `git update-ref -d`. > > - `git refs update` to update references. This is the equivalent of > `git update-ref <refname> <oldvalue> <newvalue>`. > > - `git refs rename` to rename a reference, including its reflog. This > does not have an equivalent in git-update-ref(1), but is inspired by > and supersedes [1]. > > Changes in v4: > - Add a couple more tests around symrefs. > - Use a subshell in one of the tests for consistency. > - Link to v3: https://patch.msgid.link/20260630-pks-refs-writing-subcommands-v3-0-deb04de1ecef@pks.im
Good that this came just in time before I started merging things down to 'next' ;-) Will replace.