Re: [PATCH 10/17] pathspec: simpler logic to prefix original pathspec elements

2016-12-06 Thread Brandon Williams
On 12/06, Stefan Beller wrote: > On Tue, Dec 6, 2016 at 1:51 PM, Brandon Williams wrote: > > > struct strbuf sb = STRBUF_INIT; > > - if (prefixlen && !literal_global) { > > - /* Preserve the actual prefix length of each > > pattern */ > > -

Re: [PATCH 10/17] pathspec: simpler logic to prefix original pathspec elements

2016-12-06 Thread Stefan Beller
On Tue, Dec 6, 2016 at 1:51 PM, Brandon Williams wrote: > struct strbuf sb = STRBUF_INIT; > - if (prefixlen && !literal_global) { > - /* Preserve the actual prefix length of each pattern > */ > - if (short_magic) > -

[PATCH 10/17] pathspec: simpler logic to prefix original pathspec elements

2016-12-06 Thread Brandon Williams
The logic used to prefix an original pathspec element with 'prefix' magic is more general purpose and can be used for more than just short magic. Remove the extra code paths and rename 'prefix_short_magic' to 'prefix_magic' to better indicate that it can be used in more general situations. Also,