aboutsummaryrefslogtreecommitdiffstats
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-02-13 14:44:47 -0800
committerJunio C Hamano <gitster@pobox.com>2024-02-13 14:44:47 -0800
commit908fde12b0d59645cdb684ba9862e7665d89695e (patch)
tree57334c807603ab3e41c4d1fe2a974fa2e5b0e470 /builtin
parent7adf215fede93114f8ee376c82adb5b8dd0f73c7 (diff)
parent0aabeaa562fa269834f10cbda6e966b553dcec71 (diff)
downloadgit-908fde12b0d59645cdb684ba9862e7665d89695e.tar.gz
Merge branch 'tc/show-ref-exists-fix' into maint-2.43
Update to a new feature recently added, "git show-ref --exists". * tc/show-ref-exists-fix: builtin/show-ref: treat directory as non-existing in --exists
Diffstat (limited to 'builtin')
-rw-r--r--builtin/show-ref.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/show-ref.c b/builtin/show-ref.c
index aaa2c39b2f..79955c2856 100644
--- a/builtin/show-ref.c
+++ b/builtin/show-ref.c
@@ -238,7 +238,7 @@ static int cmd_show_ref__exists(const char **refs)
if (refs_read_raw_ref(get_main_ref_store(the_repository), ref,
&unused_oid, &unused_referent, &unused_type,
&failure_errno)) {
- if (failure_errno == ENOENT) {
+ if (failure_errno == ENOENT || failure_errno == EISDIR) {
error(_("reference does not exist"));
ret = 2;
} else {