summaryrefslogtreecommitdiff
path: root/packfile.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-23 05:38:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-23 05:38:13 (GMT)
commitc89b6e136e421f1e9108b3c5bc050b19b0243844 (patch)
tree8d81e022f855aad5d29853b56b886d3c6b382c45 /packfile.c
parent05682ee270199fdfbc11883458b3639b2b1577df (diff)
parent279ffad17dcc3b72aa7cb5c73fb7aa8eddeed9da (diff)
downloadgit-c89b6e136e421f1e9108b3c5bc050b19b0243844.zip
git-c89b6e136e421f1e9108b3c5bc050b19b0243844.tar.gz
git-c89b6e136e421f1e9108b3c5bc050b19b0243844.tar.bz2
Merge branch 'ds/lazy-load-trees'
The code has been taught to use the duplicated information stored in the commit-graph file to learn the tree object name for a commit to avoid opening and parsing the commit object when it makes sense to do so. * ds/lazy-load-trees: coccinelle: avoid wrong transformation suggestions from commit.cocci commit-graph: lazy-load trees for commits treewide: replace maybe_tree with accessor methods commit: create get_commit_tree() method treewide: rename tree to maybe_tree
Diffstat (limited to 'packfile.c')
-rw-r--r--packfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/packfile.c b/packfile.c
index 6c3ddc3..bfe2385 100644
--- a/packfile.c
+++ b/packfile.c
@@ -1944,7 +1944,7 @@ static int add_promisor_object(const struct object_id *oid,
struct commit *commit = (struct commit *) obj;
struct commit_list *parents = commit->parents;
- oidset_insert(set, &commit->tree->object.oid);
+ oidset_insert(set, get_commit_tree_oid(commit));
for (; parents; parents = parents->next)
oidset_insert(set, &parents->item->object.oid);
} else if (obj->type == OBJ_TAG) {