Active_nr is unsigned, hence can't be < 0
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
4890888d74
commit
e1944f4074
@ -682,8 +682,6 @@ int get_sha1_with_mode(const char *name, unsigned char *sha1, unsigned *mode)
|
|||||||
namelen = namelen - (cp - name);
|
namelen = namelen - (cp - name);
|
||||||
if (!active_cache)
|
if (!active_cache)
|
||||||
read_cache();
|
read_cache();
|
||||||
if (active_nr < 0)
|
|
||||||
return -1;
|
|
||||||
pos = cache_name_pos(cp, namelen);
|
pos = cache_name_pos(cp, namelen);
|
||||||
if (pos < 0)
|
if (pos < 0)
|
||||||
pos = -pos - 1;
|
pos = -pos - 1;
|
||||||
|
Reference in New Issue
Block a user