summaryrefslogtreecommitdiff
path: root/t/unit-tests/t-basic.c
diff options
context:
space:
mode:
authorToon Claes <toon@iotcl.com>2024-01-10 15:15:59 +0100
committerJunio C Hamano <gitster@pobox.com>2024-01-18 11:17:25 -0800
commit0aabeaa562fa269834f10cbda6e966b553dcec71 (patch)
treef469cf3e5b3f6708729e3039eba0be9145fd84ec /t/unit-tests/t-basic.c
parent564d0252ca632e0264ed670534a51d18a689ef5d (diff)
builtin/show-ref: treat directory as non-existing in --exists
9080a7f178 (builtin/show-ref: add new mode to check for reference existence, 2023-10-31) added the option --exists to git-show-ref(1). When you use this option against a ref that doesn't exist, but it is a parent directory of an existing ref, you get the following error: $ git show-ref --exists refs/heads error: failed to look up reference: Is a directory when the ref-files backend is in use. To be more clear to user, hide the error about having found a directory. What matters to the user is that the named ref does not exist. Instead, print the same error as when the ref was not found: error: reference does not exist Signed-off-by: Toon Claes <toon@iotcl.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/unit-tests/t-basic.c')
0 files changed, 0 insertions, 0 deletions