Thread (4 messages) flat view 4 messages, 4 authors, 2016-06-15

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

From: Marc Strapetz <hidden>
Date: 2016-06-15 22:49:59

Possibly related (same subject, not in this thread)

quoted
 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 [off-list ref] writes:
quoted
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 <redacted>
---
 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help