X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unpack-trees.c;h=e8f03f51541472ead12d55672ba4422f97a3c113;hb=6c1c4423e2f83037ef762d63be6edbc1f9e6e867;hp=490cd5f6f4779cbff68405722b98e522cbeb3cde;hpb=958ff4a5973c9858c36c405c2f593cf5172e5e1c;p=git.git diff --git a/unpack-trees.c b/unpack-trees.c index 490cd5f6f..e8f03f515 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -520,9 +520,17 @@ static int find_cache_pos(struct traverse_info *info, 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, '/');