On Thu, Dec 8, 2016 at 6:27 AM, Brandon Williams <bmw...@google.com> wrote:
>> On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams <bmw...@google.com> wrote:
>> > @@ -362,8 +368,6 @@ static unsigned prefix_pathspec(struct pathspec_item 
>> > *item,
>> >         } else {
>> >                 item->original = xstrdup(elt);
>> >         }
>> > -       item->len = strlen(item->match);
>> > -       item->prefix = prefixlen;
>> >
>> >         if (flags & PATHSPEC_STRIP_SUBMODULE_SLASH_CHEAP)
>> >             strip_submodule_slash_cheap(item);
>> > @@ -371,13 +375,14 @@ static unsigned prefix_pathspec(struct pathspec_item 
>> > *item,
>> >         if (flags & PATHSPEC_STRIP_SUBMODULE_SLASH_EXPENSIVE)
>> >             strip_submodule_slash_expensive(item);
>> >
>> > -       if (magic & PATHSPEC_LITERAL)
>> > +       if (magic & PATHSPEC_LITERAL) {
>> >                 item->nowildcard_len = item->len;
>> > -       else {
>> > +       } else {
>> >                 item->nowildcard_len = simple_length(item->match);
>> >                 if (item->nowildcard_len < prefixlen)
>> >                         item->nowildcard_len = prefixlen;
>> >         }
>> > +
>> >         item->flags = 0;
>>
>> You probably can move this line up with the others too.
>
> I didn't move the item->flags assignment up since the code immediately
> following this assignment deal with setting item->flags.  I made more
> sense to keep them grouped.

It's probably why I put it there in the beginning :) Yes let's leave
it where it is then.
-- 
Duy

Reply via email to