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

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

From: Kevin Ballard <hidden>
Date: 2016-06-15 22:49:59

Possibly related (same subject, not in this thread)

On Nov 5, 2010, at 9:58 AM, 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.
Would this actually break any existing setups? The only ones that are affected
are ones beginning with ", which I imagine would be rather rare. I personally
am in favor of having an unambiguous way to encode whitespace into the pattern.
Having to use ? has always struck me as being, well, not very good, especially
if you have 2 files that only differ at that character (e.g. file.1 and "file 1").

-Kevin Ballard
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help