Re: [PATCH v2 3/3] show-ref: add --symbolic-name option
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 10, 2024, 15:27 UTC
- Message-ID
- <xmqqseztxmp9.fsf@gitster.g>
- In-Reply-To
- <ZhY3UCwJeMcG4fH1@tanuki>
Patrick Steinhardt <ps@pks.im> writes:
Show 14 quoted lines
> On Mon, Apr 08, 2024 at 05:38:13PM +0000, John Cai via GitGitGadget wrote: >> From: John Cai <johncai86@gmail.com> >> >> For reftable development, it would be handy to have a tool to provide >> the direct value of any ref whether it be a symbolic ref or not. >> Currently there is git-symbolic-ref, which only works for symbolic refs, >> and git-rev-parse, which will resolve the ref. Let's teach show-ref a >> --symbolic-name option that will cause git-show-ref(1) to print out the >> value symbolic references points to. > > I think it was Peff who shared a way to achieve this without actually > introducing a new option via `git for-each-ref --format=`. Can we maybe > provide some benchmarks to demonstrate that this variant is preferable > over what's already possible?
Yes, I recall that discussion, and in fact I was a bit surprised to see that this iteration still went to the show-ref route.
Thanks for bringing it up.