git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [BUG] ls-files '**' globstar matches one or more directories instead of zero or more directories

From
ABAlistair Buxton <a.j.buxton@gmail.com>
Date
Apr 16, 2017, 18:45 UTC
Message-ID
<CAO-Op+HTNdn6gE_V-4dBjjYTfSjq71sXhBVV6vutFzm2fsctQQ@mail.gmail.com>
In-Reply-To
<CAO-Op+Fd9x7O66skWWy5TkTfMst7ohUiw3U9MMujyvYsjWnFSg@mail.gmail.com>

On IRC someone pointed me to the glossary section for pathspec, and I find that even more confusing.

In the section about ":(glob)" it says:
> For example, "**/foo" matches file or directory "foo" anywhere, the same as pattern "foo".

This is not true for ls-files: ":(glob)**/.gitignore" is completely different to ":(glob).gitignore".

The only place where it is true is inside .gitignore files, and there the ":(glob)" syntax does not work.

-- 
Alistair Buxton
a.j.buxton@gmail.com
Previous: Alistair Buxton
Message 5 of 5 in “[BUG] ls-files '**' globstar matches one or more directories instead of zero or more directories”
  1. Alistair BuxtonApr 14, 2017
  2. Duy NguyenApr 16, 2017
  3. Duy NguyenApr 16, 2017
  4. Alistair BuxtonApr 16, 2017
  5. Alistair BuxtonApr 16, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.