]> git.ipfire.org Git - thirdparty/git.git/blobdiff - unpack-trees.c
Merge branch 'ab/pager-exit-log'
[thirdparty/git.git] / unpack-trees.c
index af6e9b9c2fd558dc625ddd8f63b54c9e8d489e56..f5f668f532d8d574735da064f4dfb5feb8c0cd95 100644 (file)
@@ -1549,14 +1549,10 @@ static void mark_new_skip_worktree(struct pattern_list *pl,
 static void populate_from_existing_patterns(struct unpack_trees_options *o,
                                            struct pattern_list *pl)
 {
-       char *sparse = git_pathdup("info/sparse-checkout");
-
-       pl->use_cone_patterns = core_sparse_checkout_cone;
-       if (add_patterns_from_file_to_list(sparse, "", 0, pl, NULL) < 0)
+       if (get_sparse_checkout_patterns(pl) < 0)
                o->skip_sparse_checkout = 1;
        else
                o->pl = pl;
-       free(sparse);
 }
 
 
@@ -1726,8 +1722,6 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
                if (!ret) {
                        if (git_env_bool("GIT_TEST_CHECK_CACHE_TREE", 0))
                                cache_tree_verify(the_repository, &o->result);
-                       if (!o->result.cache_tree)
-                               o->result.cache_tree = cache_tree();
                        if (!cache_tree_fully_valid(o->result.cache_tree))
                                cache_tree_update(&o->result,
                                                  WRITE_TREE_SILENT |