Re: [RFC/PATCH] pathspec: allow escaped query values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 02/06/16 00:52, Stefan Beller wrote:
> In our own .gitattributes file we have attributes such as:
> 
>     *.[ch] whitespace=indent,trail,space
> 
> When querying for attributes we want to be able to ask for the exact
> value, i.e.
> 
>     git ls-files :(attr:whitespace=indent,trail,space)
> 
> should work, but the commas are used in the attr magic to introduce
> the next attr, such that this query currently fails with
> 
> fatal: Invalid pathspec magic 'trail' in ':(attr:whitespace=indent,trail,space)'
> 
> This change allows escaping characters by a backslash, such that the query
> 
>     git ls-files :(attr:whitespace=indent\,trail\,space)

Not having given this much thought at all, but the question which comes
to mind is: can you use some other separator for the <attr>-s rather than
a comma? That way you don't need to quote them in the <value> part of the
<attr>-spec.

(I dunno, maybe use ; or : instead?)

ATB,
Ramsay Jones



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]