Files
git-mirror/Documentation
Meet Soni 0f0a8a11c0 builtin/refs: add 'exists' subcommand
As part of the ongoing effort to consolidate reference handling,
introduce a new `exists` subcommand. This command provides the same
functionality and exit-code behavior as `git show-ref --exists`, serving
as its modern replacement.

The logic for `show-ref --exists` is minimal. Rather than creating a
shared helper function which would be overkill for ~20 lines of code,
its implementation is intentionally duplicated here. This contrasts with
`git refs list`, where sharing the larger implementation of
`for-each-ref` was necessary.

Documentation for the new subcommand is also added to the `git-refs(1)`
man page.

Mentored-by: Patrick Steinhardt <ps@pks.im>
Mentored-by: shejialuo <shejialuo@gmail.com>
Signed-off-by: Meet Soni <meetsoni3017@gmail.com>
Acked-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-09-02 09:58:35 -07:00
..
2025-08-22 13:13:22 -07:00
2025-03-01 10:26:15 -08:00
2025-02-14 17:53:47 -08:00
2025-02-18 15:30:31 -08:00
2025-02-14 17:53:47 -08:00
2025-06-17 10:44:38 -07:00
2025-08-04 08:10:33 -07:00
2025-02-14 17:53:47 -08:00
2025-07-21 09:14:27 -07:00