Subject: Re: Unexpected (bug-like) behavior in `git ls-remote` matching.

From: Junio C Hamano <[email-masked]>
Date: Tue, 07 Feb 2023 23:20:22 -0800

William Blevins <[email-masked]> writes:

> What is totally unexpected.... is the most simple search for ABC-1...
> ```
> $ git ls-remote --heads [email-masked]:owner/repo.git ABC-1
> <ref>    refs/head/ABC-1
> <ref>    refs/head/feature/ABC-1
> ```

Sorry, but I cannot see what is surprising about the above.  If you
have these branches locally, you should also see these refs in the
output of "git show-ref ABC-1".  Refname hierarchies work just like
pathnames with directories, and without glob in the pattern, tail
matching that honors path component boundary is very much the norm
in the oldest part of Git, i.e. ABC-1 matches refs/heads/ABC-1 but
not refs/heads/XABC-1.