projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[PATCH] ls-tree matching multiple paths
[git.git]
/
diffcore-pathspec.c
diff --git
a/diffcore-pathspec.c
b/diffcore-pathspec.c
index
4b7adc3
..
78b3cb4
100644
(file)
--- a/
diffcore-pathspec.c
+++ b/
diffcore-pathspec.c
@@
-21,8
+21,8
@@
static int matches_pathspec(const char *name, struct path_spec *s, int cnt)
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;