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>
This commit is contained in:
Junio C Hamano 2006-02-12 23:46:25 -08:00
parent f9666adfea
commit 7b80be150c

View File

@ -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;