Re: [PATCH 00/12] show-ref: introduce mode to check for ref existence
- From
Han-Wen Nienhuys <hanwen@google.com>
- Date
- Oct 25, 2023, 14:26 UTC
- Message-ID
- <CAFQ2z_PqNsz+zycSxz=q2cUVOpJS-AEjwHxEM-fiafxd3dxc9g@mail.gmail.com>
- In-Reply-To
- <xmqqttqf3k5a.fsf@gitster.g>
On Tue, Oct 24, 2023 at 9:17 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 12 quoted lines
> > Patrick Steinhardt <ps@pks.im> writes: > > > this patch series introduces a new `--exists` mode to git-show-ref(1) to > > explicitly check for the existence of a reference, only. > > I agree that show-ref would be the best place for this feature (not > rev-parse, which is already a kitchen sink). After all, the command > was designed for validating refs in 358ddb62 (Add "git show-ref" > builtin command, 2006-09-15). > > Thanks. Hopefully I can take a look before I go offline.
The series description doesn't say why users would care about this.
If this is just to ease testing, I suggest adding functionality to a suitable test helper. Anything you add to git-show-ref is a publicly visible API that needs documentation and comes with a stability guarantee that is more expensive to maintain than test helper functionality.
-- Han-Wen Nienhuys - Google Munich I work 80%. Don't expect answers from me on Fridays. -- Google Germany GmbH, Erika-Mann-Strasse 33, 80636 Munich Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Paul Manicle, Liana Sebastian