Re: [GSoC][Proposal RFC] Consolidate ref-related functionality into git-refs
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Apr 4, 2025, 11:46 UTC
- Message-ID
- <CAOLa=ZQ4nTP7Ls=JsnQSbvpvw+OhjXqqoQxpsTKA0x-HxaDH5A@mail.gmail.com>
- In-Reply-To
- <CAPhwyn3McL-2rwjkexsDUWqxt0Kr4UsDVy_G=s1DmKhrw5BZ-A@mail.gmail.com>
Meet Soni <meetsoni3017@gmail.com> writes:
[snip]
Show 27 quoted lines
> Command mapping and naming: > --------------------------- > > I have taken reference for potential names for these subcommands from Patrick’s > suggestion (https://gitlab.com/gitlab-org/git/-/issues/330): > > # Replaces git-show-ref(1) and git-for-each-ref(1). > $ git refs list > > # Replaces `git show-ref --exists`. > $ git refs exist > > # Replaces `git show-ref --verify <ref>`. > $ git refs show > > # Replaces git-symbolic-ref(1) to show a ref. > $ git refs resolve > > # Replaces git-pack-ref(1). > $ git refs pack > > # Replaces git-update-ref(1). > $ git refs write > > # Replaces git-check-ref-format(1). > $ git refs check-format >
One other command that I noticed, which we didn't talk about it 'git reflog'. I would think, it would be nice to also fit this as 'git refs logs', but it doesn't have to be part of GSoC.
Show 36 quoted lines
> Below is a list of the commands along with their associated subcommands/flags > that need to be considered for consolidation under this project: > > git show-ref -> git refs list > Used to list references in a local repository. > * abbrev > * branches > * tags > * exists > * verify > * exclude-existing > * dereference > * head > * hash > * quiet > > > git update-ref -> git refs update/write > Used to update the object name stored in a ref safely. > Subcommands: > * [symref-]update > * [symref-]create > * [symref-]delete > * [symref-]verify > * option > * start > * prepare > * commit > * Abort > Options/Flags: > * --stdin > * -m > * -d > * --no-deref > * --create-reflog >
One of the issues we had with 'git update-ref' was that it wasn't initially built with symref compatibility with mind, which is why we had to add 'symref-*' as new subcommands. This time, we can fix that and reduce the surface of subcommands.
[snip]
I agree with Patricks comments already. Just wanted to comment on some additional points. Thanks for the proposal.
- Karthik