]> git.ipfire.org Git - thirdparty/git.git/blobdiff - cache-tree.c
Seventh batch
[thirdparty/git.git] / cache-tree.c
index c22161f987152ea18715b00815e987847786c5ff..62edee45e43ee281f8e2b20f93e4b623e0c90dbc 100644 (file)
@@ -5,6 +5,7 @@
 #include "cache-tree.h"
 #include "object-store.h"
 #include "replace-object.h"
+#include "promisor-remote.h"
 
 #ifndef DEBUG_CACHE_TREE
 #define DEBUG_CACHE_TREE 0
@@ -357,7 +358,7 @@ static int update_one(struct cache_tree *it,
                }
 
                ce_missing_ok = mode == S_IFGITLINK || missing_ok ||
-                       (repository_format_partial_clone &&
+                       (has_promisor_remote() &&
                         ce_skip_worktree(ce));
                if (is_null_oid(oid) ||
                    (!ce_missing_ok && !has_object_file(oid))) {
@@ -407,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;