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

2016-06-02 Thread Ramsay Jones
On 02/06/16 20:46, Junio C Hamano wrote: > Ramsay Jones writes: > >> I think Junio wants to go with just " quoting (see other thread). > > No. I meant just \ quoting. Yes, sorry, I only just read your last email on the other thread. ATB, Ramsay Jones -- To unsubscribe from this list: send

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

2016-06-02 Thread Ramsay Jones
On 02/06/16 20:29, Junio C Hamano wrote: > Junio C Hamano writes: > >> On Thu, Jun 2, 2016 at 11:42 AM, Ramsay Jones >> wrote: That would be workable, I would think. Before attr:VAR=VAL extention, supported pathspec were only single lowercase-ascii alphabet tokens, so nob

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

2016-06-02 Thread Junio C Hamano
Ramsay Jones writes: > I think Junio wants to go with just " quoting (see other thread). No. I meant just \ quoting. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-i

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

2016-06-02 Thread Ramsay Jones
On 02/06/16 20:04, Stefan Beller wrote: > On Thu, Jun 2, 2016 at 11:42 AM, Ramsay Jones > wrote: >> >> >> On 02/06/16 17:10, Junio C Hamano wrote: >>> Ramsay Jones writes: >>> So, at risk of annoying you, let me continue in my ignorance a little longer and ask: even if you have to pro

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

2016-06-02 Thread Junio C Hamano
Junio C Hamano writes: > On Thu, Jun 2, 2016 at 11:42 AM, Ramsay Jones > wrote: >>> >>> That would be workable, I would think. Before attr:VAR=VAL >>> extention, supported pathspec were only single lowercase-ascii >>> alphabet tokens, so nobody would have used " as a part of magic. So >>> qut

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

2016-06-02 Thread Stefan Beller
On Thu, Jun 2, 2016 at 11:42 AM, Ramsay Jones wrote: > > > On 02/06/16 17:10, Junio C Hamano wrote: >> Ramsay Jones writes: >> >>> So, at risk of annoying you, let me continue in my ignorance a little >>> longer and ask: even if you have to protect all of this 'magic' from >>> the shell with '/"

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

2016-06-02 Thread Junio C Hamano
On Thu, Jun 2, 2016 at 11:42 AM, Ramsay Jones wrote: >> >> That would be workable, I would think. Before attr:VAR=VAL >> extention, supported pathspec were only single lowercase-ascii >> alphabet tokens, so nobody would have used " as a part of magic. So >> quting with double-quote pair would w

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

2016-06-02 Thread Ramsay Jones
On 02/06/16 17:10, Junio C Hamano wrote: > Ramsay Jones writes: > >> So, at risk of annoying you, let me continue in my ignorance a little >> longer and ask: even if you have to protect all of this 'magic' from >> the shell with '/" quoting, could you not use (nested) quotes to >> protect the

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

2016-06-02 Thread Junio C Hamano
Ramsay Jones writes: > So, at risk of annoying you, let me continue in my ignorance a little > longer and ask: even if you have to protect all of this 'magic' from > the shell with '/" quoting, could you not use (nested) quotes to > protect the part of an ? For example: > > git ls-files ':(a

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

2016-06-02 Thread Ramsay Jones
On 02/06/16 06:46, Junio C Hamano wrote: > Ramsay Jones writes: > >> Not having given this much thought at all, but the question which comes >> to mind is: can you use some other separator for the -s rather than >> a comma? That way you don't need to quote them in the part of the >> -spec. >>

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

2016-06-01 Thread Junio C Hamano
Ramsay Jones writes: > Not having given this much thought at all, but the question which comes > to mind is: can you use some other separator for the -s rather than > a comma? That way you don't need to quote them in the part of the > -spec. > > (I dunno, maybe use ; or : instead?) There are tw

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

2016-06-01 Thread Stefan Beller
On Wed, Jun 1, 2016 at 5:33 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> This change allows escaping characters by a backslash, such that the query >> >> git ls-files :(attr:whitespace=indent\,trail\,space) >> >> will match all path that have the value "indent,trail,space" for the >

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

2016-06-01 Thread Stefan Beller
On Wed, Jun 1, 2016 at 5:38 PM, Ramsay Jones wrote: > > > 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. >

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

2016-06-01 Thread Ramsay Jones
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) >

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

2016-06-01 Thread Junio C Hamano
Stefan Beller writes: > This change allows escaping characters by a backslash, such that the query > > git ls-files :(attr:whitespace=indent\,trail\,space) > > will match all path that have the value "indent,trail,space" for the > whitespace attribute. To accomplish this, we need to modify tw

[RFC/PATCH] pathspec: allow escaped query values

2016-06-01 Thread Stefan Beller
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 i