Re: [PATCH 1/1] builtin/show-ref: treat directory directory as non-existing in --exists

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 10, 2024 at 9:19 AM Toon Claes <toon@xxxxxxxxx> wrote:
> Recently [1] the option --exists was added 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're getting the following error:
>
>     $ git show-ref --exists refs/heads
>     error: failed to look up reference: Is a directory
>
> This error is confusing to the user. Instead, print the same error as
> when the ref was not found:
>
>     error: reference does not exist
>
> Signed-off-by: Toon Claes <toon@xxxxxxxxx>

It may not be worth a reroll, but I found the explanation you gave in
the cover letter more illuminating than what is written above for
explaining why this change is desirable. In particular, the discussion
of the reftable backend was very helpful.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux