Merge branch 'jt/cache-tree-avoid-lazy-fetch-during-merge'
[git/git.git] / cache-tree.c
index 0e5724f..62edee4 100644 (file)
@@ -408,7 +408,7 @@ static int update_one(struct cache_tree *it,
        if (repair) {
                struct object_id oid;
                hash_object_file(buffer.buf, buffer.len, tree_type, &oid);
-               if (has_object_file(&oid))
+               if (has_object_file_with_flags(&oid, OBJECT_INFO_SKIP_FETCH_OBJECT))
                        oidcpy(&it->oid, &oid);
                else
                        to_invalidate = 1;