]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'dl/cache-tree-fully-valid-fix' into jch
authorJunio C Hamano <gitster@pobox.com>
Thu, 9 Apr 2026 18:22:18 +0000 (11:22 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 9 Apr 2026 18:22:18 +0000 (11:22 -0700)
The check that implements the logic to see if an in-core cache-tree
is fully ready to write out a tree object was broken, which has
been corrected.

* dl/cache-tree-fully-valid-fix:
  cache-tree: fix inverted object existence check in cache_tree_fully_valid

1  2 
cache-tree.c

diff --cc cache-tree.c
index 7881b42aa24c80b0c96635da874c44c862d0ca8b,366b1d7dcd80817f5228830097e4ab982715eae4..2b636eb3f8bddd026af54a342c64cee5fbe35c86
@@@ -238,8 -239,8 +238,8 @@@ int cache_tree_fully_valid(struct cache
        if (!it)
                return 0;
        if (it->entry_count < 0 ||
-           odb_has_object(the_repository->objects, &it->oid,
-                          ODB_HAS_OBJECT_RECHECK_PACKED | ODB_HAS_OBJECT_FETCH_PROMISOR))
+           !odb_has_object(the_repository->objects, &it->oid,
 -                         HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
++                          ODB_HAS_OBJECT_RECHECK_PACKED | ODB_HAS_OBJECT_FETCH_PROMISOR))
                return 0;
        for (i = 0; i < it->subtree_nr; i++) {
                if (!cache_tree_fully_valid(it->down[i]->cache_tree))