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

Re: [PATCH] Make !pattern in .gitattributes non-fatal

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 3, 2013, 06:30 UTC
Message-ID
<7vppzhc7wf.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CACsJy8CO1i1_QpMbLvfys=wsLDPTK69_9JanQYq2D3-fboK_WA@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
> This "return NULL;" means we ignore "!blah" pattern, which is a
> regression, isn't it? Should we treat '!' as literal here?

Probably not. Can you point to a project everybody has heard of that keeps track of a path that begins with an exclamation point?

With clarification to the documentation that says "you cannot use ! to negate" and your "die on such an entry", we have been going in the direction that forbids the use of such an entry, and making it mean literal exclamation point is going sideways in the middle of the road.

Besides, if you want to match a path that begins with an exclam, you can always say "[!]", no?

Previous: Duy NguyenNext: Nguyễn Thái Ngọc Duy
Message 7 of 8 in “Make !pattern in .gitattributes non-fatal”
  1. Make !pattern in .gitattributes non-fatalThomas Rast, Mar 1, 2013
  2. Junio C HamanoMar 1, 2013
  3. Junio C HamanoMar 1, 2013
  4. Thomas RastMar 1, 2013
  5. Junio C HamanoMar 1, 2013
  6. Duy NguyenMar 2, 2013
  7. Junio C HamanoMar 3, 2013
  8. attr: always treat the leading exclamation mark as literalNguyễn Thái Ngọc Duy, Mar 2, 2013

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.