All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Strapetz <marc.strapetz@syntevo.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] attr: support quoting pathname patterns in C style
Date: Sat, 06 Nov 2010 09:28:34 +0100	[thread overview]
Message-ID: <4CD511B2.3080200@syntevo.com> (raw)
In-Reply-To: <7vvd4bu2pl.fsf@alter.siamese.dyndns.org>

>>  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:
> 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.
> 
> 

  parent reply	other threads:[~2010-11-06  8:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-03 12:24 .gitattributes escape character? Marc Strapetz
2010-11-03 15:47 ` Nguyen Thai Ngoc Duy
2010-11-03 17:13   ` Marc Strapetz
2010-11-03 21:03   ` Kevin Ballard
2010-11-04 13:55   ` [PATCH] attr: support quoting pathname patterns in C style Nguyễn Thái Ngọc Duy
2010-11-04 17:21     ` Sverre Rabbelier
2010-11-04 22:53     ` Eric Sunshine
2010-11-05  2:02       ` Nguyen Thai Ngoc Duy
2010-11-05 16:58     ` Junio C Hamano
2010-11-05 21:46       ` Kevin Ballard
2010-11-08 18:40         ` Junio C Hamano
2010-11-08 21:56           ` Kevin Ballard
2010-11-09  7:48             ` Johannes Sixt
2010-11-09  8:08               ` Kevin Ballard
2010-11-10  0:07             ` Junio C Hamano
2010-11-10  0:27               ` Kevin Ballard
2010-11-06  8:28       ` Marc Strapetz [this message]
2010-11-07  8:05       ` Nguyễn Thái Ngọc Duy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CD511B2.3080200@syntevo.com \
    --to=marc.strapetz@syntevo.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.