git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Unexpected (bug-like) behavior in `git ls-remote` matching.
@ 2023-02-07 23:03 William Blevins
  2023-02-08  7:20 ` Junio C Hamano
  2023-02-08 14:08 ` Unexpected (bug-like) behavior in `git ls-remote` matching Ævar Arnfjörð Bjarmason
  0 siblings, 2 replies; 16+ messages in thread
From: William Blevins @ 2023-02-07 23:03 UTC (permalink / raw)
  To: git

Setup as follows.

example repo: git@github.com:owner/repo.git
example branches:
* ABC-1
* feature/ABC-1
* XBC-1
* EABC-1

These are all things that work as "expected".
```
$ git ls-remote --heads git@github.com:owner/repo.git ABC-
$ git ls-remote --heads git@github.com:owner/repo.git BC-1
$ git ls-remote --heads git@github.com:owner/repo.git XBC-1
<ref>    refs/head/XBC-1
$ git ls-remote --heads git@github.com:owner/repo.git *BC-1
<ref>    refs/head/ABC-1
<ref>    refs/head/EABC-1
<ref>    refs/head/XBC-1
<ref>    refs/head/feature/ABC-1
$ git ls-remote --heads git@github.com:owner/repo.git "[^/]ABC-1"
<ref>    refs/head/EABC-1
```

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

It appears that the matching behavior trims at the last slash... which
isn't correct.

V/R,
William

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-02-11  4:53 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-07 23:03 Unexpected (bug-like) behavior in `git ls-remote` matching William Blevins
2023-02-08  7:20 ` Junio C Hamano
2023-02-08 13:49   ` William Blevins
2023-02-08 14:51     ` Philip Oakley
2023-02-08 16:30     ` Jeff King
2023-02-08 16:33       ` Jeff King
2023-02-08 17:46         ` Junio C Hamano
2023-02-08 17:40       ` Junio C Hamano
2023-02-09 13:15         ` Jeff King
2023-02-09 19:43           ` Junio C Hamano
2023-02-11  2:41             ` Jeff King
2023-02-11  2:44               ` [PATCH 1/2] doc/ls-remote: cosmetic cleanups for examples Jeff King
2023-02-11  2:44               ` [PATCH 2/2] doc/ls-remote: clarify pattern format Jeff King
2023-02-11  2:54                 ` Junio C Hamano
2023-02-11  4:52                   ` [PATCH v2 " Jeff King
2023-02-08 14:08 ` Unexpected (bug-like) behavior in `git ls-remote` matching Ævar Arnfjörð Bjarmason

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).