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

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

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Nov 5, 2010, 02:02 UTC
Message-ID
<AANLkTimbou_seZnNu9W3akT7SabxSQ7pEJBifjH3UY1r@mail.gmail.com>
In-Reply-To
<4CD33968.4060704@gmail.com>
2010/11/5 Eric Sunshine <ericsunshine@gmail.com>:
Show 21 quoted lines
> On 11/4/2010 9:55 AM, Nguyễn Thái Ngọc Duy wrote:
>>
>> 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>
>> diff --git a/attr.c b/attr.c
>> index 6aff695..f3063d8 100644
>> --- a/attr.c
>> +++ b/attr.c
>>        name = cp;
>> -       namelen = strcspn(name, blank);
>> +       if (*cp == '"') {
>> +               if (unquote_c_style(&pattern, name,&ep))
>> +                       die("Broken attribute line: %s", line);
>
> The error message is perhaps a bit too generic, indicating only that
> _something_ on the line caused a problem. Mentioning that bad quoting of
> 'name' was at fault would help focus the user's attention where it is
> needed.
Really.
-- 
Duy
Previous: Eric SunshineNext: Junio C Hamano
Message 8 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.