Oh, I am an idiot. Repeating the same check against the first
element of pathspec array as many times as the pathspec array
has elements in it would not do us any good.
This patch allows you to specify more than one pathspec to
diff-tree family and have them actually used.
Signed-off-by: Junio C Hamano <junkio@cox.net>
;)
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
namelen = strlen(name);
for (i = 0; i < cnt; i++) {
- int len = s->len;
- if (! strncmp(s->spec, name, len) &&
+ int len = s[i].len;
+ if (! strncmp(s[i].spec, name, len) &&
len <= namelen &&
(name[len] == 0 || name[len] == '/'))
return 1;