git ls-remote 的“模式”的定义是什么?

Tom*_*ale 6 git git-ls-remote

采用什么类型的“模式” git ls-remote

man git-ls-remote说:

   <refs>...
       When unspecified, all references, after filtering done with --heads
       and --tags, are shown. When <refs>... are specified, only references
       matching the given patterns are displayed.
Run Code Online (Sandbox Code Playgroud)

它是 POSIX shell glob、正则表达式、gitignore 模式,...?

Ben*_*hon 3

确实,文档并ls-remote没有说太多,但是你可以在其他页面找到这些信息。例如,文档git tag -l说:

该模式是 shell 通配符(即使用 fnmatch(3) 进行匹配)。

据我所知 git 仅支持基本的 glob 语法,但不支持FNM_EXTMATCH.

我认为过滤实际上是由 实现的wildmatch(),因此行为可能与标准不同fnmatch