diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2014-03-05 17:26:30 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-03-05 20:34:26 (GMT) |
commit | 3491047e14532f4c01e3459d59d914d9598721c5 (patch) | |
tree | ac5567375334dfe58019b9083e4633978cbf8a3d /cache-tree.c | |
parent | 8b7e5f79723b0f2e1d3dca4e959ad2a2041e9453 (diff) | |
download | git-3491047e14532f4c01e3459d59d914d9598721c5.zip git-3491047e14532f4c01e3459d59d914d9598721c5.tar.gz git-3491047e14532f4c01e3459d59d914d9598721c5.tar.bz2 |
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>
Diffstat (limited to 'cache-tree.c')
-rw-r--r-- | cache-tree.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cache-tree.c b/cache-tree.c index 17db9f9..7f8d74d 100644 --- a/cache-tree.c +++ b/cache-tree.c @@ -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; } |