Browse Source

cache_name_compare() compares name and stage, nothing else.

The code was a bit unclear in expressing what it wants to compare.

Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Junio C Hamano 19 years ago
parent
commit
7b80be150c
  1. 6
      read-cache.c

6
read-cache.c

@ -246,9 +246,9 @@ int cache_name_compare(const char *name1, int flags1, const char *name2, int fla @@ -246,9 +246,9 @@ int cache_name_compare(const char *name1, int flags1, const char *name2, int fla
if (len1 > len2)
return 1;

/* Differences between "assume up-to-date" should not matter. */
flags1 &= ~CE_VALID;
flags2 &= ~CE_VALID;
/* Compare stages */
flags1 &= CE_STAGEMASK;
flags2 &= CE_STAGEMASK;

if (flags1 < flags2)
return -1;

Loading…
Cancel
Save