Note that Git 2.40 (Q1 2023) does slightly update the definition of a pattern for git ls-remote.
See commit d9ec3b0, commit baebde7 (10 Feb 2023) by Jeff King (peff).
(Merged by Junio C Hamano -- gitster -- in commit 6aac634, 22 Feb 2023)
Signed-off-by: Jeff King
We document that you can specify "refs" to ls-remote, but we don't explain any further than that they are "matched" as patterns.
Since this can be interpreted in a lot of ways, let's clarify that they are tail-matched globs.
Likewise, let's use the word "patterns" to refer to them consistently, rather than "refs" (both here and in the quick "-h" help), and mention more explicitly that only one pattern needs to be matched (though there is also an example already that shows this in action).
git ls-remote now includes in its man page:
[--symref] [<repository> [<patterns>...]]
git ls-remote now includes in its man page:
<patterns>...:
When unspecified, all references, after filtering done
with --heads and --tags, are shown.
When <patterns>... are
specified, only references matching one or more of the given
patterns are displayed.
Each pattern is interpreted as a glob which is matched against
the "tail" of a ref, starting either from the start of the ref
(so a full name like refs/heads/foo matches) or from a slash
separator (so bar matches refs/heads/bar but not
refs/heads/foobar).