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

Re: [PATCH] attr: support quoting pathname patterns in C style

From
Marc Strapetz <marc.strapetz@syntevo.com>
Date
Nov 6, 2010, 08:28 UTC
Message-ID
<4CD511B2.3080200@syntevo.com>
In-Reply-To
<7vvd4bu2pl.fsf@alter.siamese.dyndns.org>
Show 5 quoted lines
>>  Obvious regression: patterns that begin with double quote will
>>  now work differently.
> 
> I'm really hesitant to pursue this route and break people's existing
> setups

If existing setups are an issue, there could be a config-property "core.gitAttributesQuoting" to enable quoting which will only be set for newly created repositories. Personally, I don't think this effort is necessary. Probably there is not even a single .gitattributes with a leading quotation mark. And if there is, it's easy to fix.

In any case, I think future git repositories and users will be grateful for quoting support: after I noticed problems with a tool-generated(!) .gitattributes files, it took me 5 minutes to try: \-quoting, "-quoting and octal-quoting, but more than 1 hour of googling, looking at git sources and finally writing an email to this list :)

Marc.
On 05.11.2010 17:58, Junio C Hamano wrote:
Show 25 quoted lines
> Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
> 
>> Full pattern must be quoted. So 'pat"t"ern attr' will give exactly
>> 'pat"t"ern', not 'pattern'. Also clarify that leading whitespaces are
>> not part of the pattern and document comment syntax.
>>
>> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
>> ---
>>  Obvious regression: patterns that begin with double quote will
>>  now work differently.
> 
> I'm really hesitant to pursue this route and break people's existing
> setups, especially if the only benefit this patch tries to achieve is to
> allow somebody to say:
> 
>     "Program Files/*.txt" ...some attr...
> 
> It is not worth the effort, risk and headache, especially because people
> with such paths are probably already using
> 
>     Program?Files/*.txt	...some attr..
> 
> to match them.
> 
> 
Previous: Kevin BallardNext: Nguyễn Thái Ngọc Duy
Message 17 of 18 in “.gitattributes escape character?”
  1. Marc StrapetzNov 3, 2010
  2. Nguyen Thai Ngoc DuyNov 3, 2010
  3. Marc StrapetzNov 3, 2010
  4. Kevin BallardNov 3, 2010
  5. attr: support quoting pathname patterns in C styleNguyễn Thái Ngọc Duy, Nov 4, 2010
  6. Sverre RabbelierNov 4, 2010
  7. Eric SunshineNov 4, 2010
  8. Nguyen Thai Ngoc DuyNov 5, 2010
  9. Junio C HamanoNov 5, 2010
  10. Kevin BallardNov 5, 2010
  11. Junio C HamanoNov 8, 2010
  12. Kevin BallardNov 8, 2010
  13. Johannes SixtNov 9, 2010
  14. Kevin BallardNov 9, 2010
  15. Junio C HamanoNov 10, 2010
  16. Kevin BallardNov 10, 2010
  17. Marc StrapetzNov 6, 2010
  18. attr: support quoting pathname patterns in C styleNguyễn Thái Ngọc Duy, Nov 7, 2010

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.