diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-01-29 16:02:59 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-01-29 16:02:59 -0800 |
| commit | cf58f5920d4fa80f5a216fbc640d3f230754f65f (patch) | |
| tree | 9276dc9f0e468ae5dae7c6e192e4fb692b0420bb /builtin | |
| parent | Merge branch 'ps/reftable-optimize-io' (diff) | |
| parent | builtin/show-ref: treat directory as non-existing in --exists (diff) | |
| download | git-cf58f5920d4fa80f5a216fbc640d3f230754f65f.tar.gz git-cf58f5920d4fa80f5a216fbc640d3f230754f65f.zip | |
Merge branch 'tc/show-ref-exists-fix'
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.c | 2 |
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 { |
