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>
it = sub->cache_tree;
while (*slash == '/')
slash++;
- if (!*slash)
- return it; /* prefix ended with slashes */
path = slash;
}
return it;