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.
这是一个POSIX的弹壳球,regex,gitignore图案,.?
发布于 2021-10-11 07:18:46
的确,ls-remote的文档并没有说明什么,但是您可以在其他页面中找到这些信息。例如,git tag -l的文档说:
模式是一个shell通配符(即,使用fnmatch(3)进行匹配)。
据我所知,git只支持基本glob语法,而不支持FNM_EXTMATCH提供的“扩展模式”。
我认为过滤实际上是由wildmatch()实现的,因此这种行为可能不同于标准的fnmatch。
https://stackoverflow.com/questions/52662337
复制相似问题