From: Junio C Hamano Date: Mon, 13 Feb 2006 07:46:25 +0000 (-0800) Subject: cache_name_compare() compares name and stage, nothing else. X-Git-Tag: v1.3.0-rc1~165^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7b80be150ce137a790f498a69a784d61d8fc2e78;p=git.git 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 --- diff --git a/read-cache.c b/read-cache.c index efbb1be87..f97f92d90 100644 --- a/read-cache.c +++ b/read-cache.c @@ -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;