summaryrefslogtreecommitdiff
path: root/cache-tree.c
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2014-03-05 18:26:29 +0100
committerJunio C Hamano <gitster@pobox.com>2014-03-05 12:34:05 -0800
commit8b7e5f79723b0f2e1d3dca4e959ad2a2041e9453 (patch)
tree62dc64caac6a39dd3a6ce1aff031541716bd0de2 /cache-tree.c
parent03b0403b4a957bb52f5266ac071869da32a3be0a (diff)
downloadgit-8b7e5f79723b0f2e1d3dca4e959ad2a2041e9453.tar.gz
cache_tree_find(): remove early return
There is no need for an early return it; from the loop if slash points at the end of the string, because that is exactly what will happen when the while condition fails at the start of the next iteration. 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.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/cache-tree.c b/cache-tree.c
index 39ad8c9941..17db9f9045 100644
--- a/cache-tree.c
+++ b/cache-tree.c
@@ -565,8 +565,6 @@ static struct cache_tree *cache_tree_find(struct cache_tree *it, const char *pat
it = sub->cache_tree;
while (*slash == '/')
slash++;
- if (!*slash)
- return it; /* prefix ended with slashes */
path = slash;
}
return it;