Re: [PATCH 03/21] pathspec: make sure the prefix part is wildcard-clean
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Jan 7, 2013, 01:10 UTC
- Message-ID
- <CACsJy8AHZhrXMziaERxXRg_s9aXa0SX=JzHbpvOA_BhG0-c59w@mail.gmail.com>
- In-Reply-To
- <1357453268-12543-4-git-send-email-pclouds@gmail.com>
On Sun, Jan 6, 2013 at 1:20 PM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
Show 10 quoted lines
> --- a/setup.c > +++ b/setup.c > @@ -250,6 +250,8 @@ static unsigned prefix_pathspec(struct pathspec_item *item, > *raw = item->match; > item->len = strlen(item->match); > item->nowildcard_len = simple_length(item->match); > + if (item->nowildcard_len < prefixlen) > + item->nowildcard_len = prefixlen; > return magic; > }
This is wrong (so much for the last-minute patch). Prefix length depends on actual pathspec (e.g. abc, ../abc and ../../abc use different prefix length). This patch should be discarded (it does not have any real impacts anyway).
-- Duy