1. Stefan Saasen
  2. git

Commits

Junio C Hamano  committed 3919d40 Merge

Merge branch 'bd/maint-unpack-trees-parawalk-fix'

* bd/maint-unpack-trees-parawalk-fix:
unpack-trees: Make index lookahead less pessimal

  • Participants
  • Parent commits 8c7da86, e53e6b4
  • Branches master

Comments (0)

Files changed (1)

File unpack-trees.c

View file
 		const char *ce_name, *ce_slash;
 		int cmp, ce_len;
 
-		if (!ce_in_traverse_path(ce, info))
+		if (ce->ce_flags & CE_UNPACKED) {
+			/*
+			 * cache_bottom entry is already unpacked, so
+			 * we can never match it; don't check it
+			 * again.
+			 */
+			if (pos == o->cache_bottom)
+				++o->cache_bottom;
 			continue;
-		if (ce->ce_flags & CE_UNPACKED)
+		}
+		if (!ce_in_traverse_path(ce, info))
 			continue;
 		ce_name = ce->name + pfxlen;
 		ce_slash = strchr(ce_name, '/');