summaryrefslogtreecommitdiff
path: root/builtin/index-pack.c
diff options
context:
space:
mode:
authorMeet Soni <meetsoni3017@gmail.com>2025-08-26 12:11:07 +0530
committerJunio C Hamano <gitster@pobox.com>2025-09-02 09:58:35 -0700
commit0f0a8a11c00295ed30b02cc721b0994900c6a3d3 (patch)
treeb853fe5407422f87325aaee3ceef1528e5865182 /builtin/index-pack.c
parent1fa68948c3d76328236cac73d2adf33c905bd8e3 (diff)
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>
Diffstat (limited to 'builtin/index-pack.c')
0 files changed, 0 insertions, 0 deletions