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

Re: [1.8.0] Support quoting in .gitattributes, .gitignore

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 3, 2011, 19:03 UTC
Message-ID
<7vbp2t0wld.fsf@alter.siamese.dyndns.org>
In-Reply-To
<AANLkTikHNKmcapVWBAcufq8ONVWOWHbnL-H8Nf2WmKM5@mail.gmail.com>
Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
Show 6 quoted lines
> Migration plan:
>
> I think a release note mentioning this is enough. No migration needed.
>
> But to be safe, we can make post-1.7.5 warn users about patterns with
> leading double quote. By 1.8.0, the new behavior will be used.

That's obviously not a migration plan, and it is worse than not having the warning at all. People with paths that begin with dq (which I suspect would be an empty set) will get wraning every time they do anything with git, and until 1.8.0 there is no way to turn that warnings off without breaking their pattern (like removing the entry from the attributes file), and when 1.8.0 comes their patterns will break.

How about introducing a new feature in .gitattributes file so that the parser can tell if the file is (1) written pre-1.7.5 that depends on the old behaviour, (2) written post-1.7.5 by a person who is aware of the dq convention, but still relying on the old behaviour, (3) written post-1.7.5 to take advantage of the new behaviour? E.g., you can explicitly mark your .gitattributes file by putting "# feature: no-cq-pattern" as the first line that the patterns in the file relies on the traditional behaviour, or "# feature: cq-pattern" to cause the parser to interpret cquoted patterns, and the last 1.7.x will warn if a file does not have this explicit marking, but has a pattern that would change the behaviour. Then 1.8.0 would flip the default.

Previous: Nguyen Thai Ngoc DuyNext: Nguyen Thai Ngoc Duy
Message 2 of 3 in “[1.8.0] Support quoting in .gitattributes, .gitignore”
  1. Nguyen Thai Ngoc DuyFeb 3, 2011
  2. Junio C HamanoFeb 3, 2011
  3. Nguyen Thai Ngoc DuyFeb 4, 2011

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.