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

Re: Typo in the .gitignore docs?

From
Duy Nguyen <pclouds@gmail.com>
Date
Mar 31, 2019, 10:04 UTC
Message-ID
<CACsJy8DmcT-2pArqtC2HGR9zBU5Mzksbcv1BcnxSAt7QoQDSsg@mail.gmail.com>
In-Reply-To
<CACsJy8Dz1TLpMSRNwGtvv9kBHKJsKcses+LegfOfpz2_N3eEHg@mail.gmail.com>
On Sun, Mar 31, 2019 at 4:54 PM Duy Nguyen <pclouds@gmail.com> wrote:
Show 9 quoted lines
> The "does not contain" is correct, but perhaps the wording is a bit
> too easy to misunderstand. If you go back to the original version of
> this document in cedb8d5d33 (Create a new manpage for the gitignore
> format, and reference it elsewhere, 2007-06-02),
> ...
> I think the part that trips people is the 'pathname' in 'checks for a
> match against the pathname relative...'. I think the key point is
> matching the pattern against any pathname _component_ in the path
> relative to the location of .gitignore.

The desscription before cedb8d5d33 (in git-ls-files.txt) uses _filename_ instead of pathname, which is probably clearer:

- - if it does not contain a slash '/', it is a shell glob
-   pattern and used to match against the filename without
-   leading directories.
-- 
Duy
Previous: Duy NguyenNext: Duy Nguyen
Message 3 of 5 in “Typo in the .gitignore docs?”
  1. Dr. Adam NielsenMar 30, 2019
  2. Duy NguyenMar 31, 2019
  3. Duy NguyenMar 31, 2019
  4. Duy NguyenApr 1, 2019
  5. Dr. Adam NielsenApr 1, 2019

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.