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>
Junio C Hamano committed
Feb 12, 2006 at 23:46 UTC
7b80be150ce137a790f498a69a784d61d8fc2e78
1 file changed
+3
-3
read-cache.c
+3
-3
@@ -246,9 +246,9 @@ int cache_name_compare(const char *name1, int flags1, const char *name2, int fla
246
if (len1 > len2)
247
return 1;
248
249
- /* Differences between "assume up-to-date" should not matter. */
250
- flags1 &= ~CE_VALID;
251
- flags2 &= ~CE_VALID;
249
+ /* Compare stages */
250
+ flags1 &= CE_STAGEMASK;
251
+ flags2 &= CE_STAGEMASK;
252
253
if (flags1 < flags2)
254
return -1;