cache_tree_find(): use path variable when passing over slashes
The search for the end of the slashes is part of the update of the path variable for the next iteration as opposed to an update of the slash variable. So iterate using path rather than slash. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
8b7e5f7972
commit
3491047e14
@ -563,9 +563,10 @@ static struct cache_tree *cache_tree_find(struct cache_tree *it, const char *pat
|
||||
if (!sub)
|
||||
return NULL;
|
||||
it = sub->cache_tree;
|
||||
while (*slash == '/')
|
||||
slash++;
|
||||
|
||||
path = slash;
|
||||
while (*path == '/')
|
||||
path++;
|
||||
}
|
||||
return it;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user