Re: [PATCH v2 14/16] pathspec: create strip submodule slash helpers

2016-12-09 Thread Duy Nguyen
On Fri, Dec 9, 2016 at 7:28 AM, Junio C Hamano wrote: > Brandon Williams writes: > >> +static void strip_submodule_slash_cheap(struct pathspec_item *item) >> +{ >> + int i; >> + >> + if ((item->len >= 1 && item->match[item->len - 1] == '/') && >> + (i = cache_name_pos(item->match,

Re: [PATCH v2 14/16] pathspec: create strip submodule slash helpers

2016-12-08 Thread Junio C Hamano
Brandon Williams writes: > +static void strip_submodule_slash_cheap(struct pathspec_item *item) > +{ > + int i; > + > + if ((item->len >= 1 && item->match[item->len - 1] == '/') && > + (i = cache_name_pos(item->match, item->len - 1)) >= 0 && > + S_ISGITLINK(active_cache[i]