mirror of
https://github.com/git/git.git
synced 2024-11-27 20:14:30 +08:00
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:
parent
f9666adfea
commit
7b80be150c
@ -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…
Reference in New Issue
Block a user