Skip to content

Commit

Permalink
cache_name_compare() compares name and stage, nothing else.
Browse files Browse the repository at this point in the history
The code was a bit unclear in expressing what it wants to compare.

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Feb 13, 2006
1 parent f9666ad commit 7b80be1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions read-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7b80be1

Please sign in to comment.