summary refs log tree commit diff
path: root/line-log.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-23 14:38:13 +0900
committerJunio C Hamano <gitster@pobox.com>2018-05-23 14:38:13 +0900
commitc89b6e136e421f1e9108b3c5bc050b19b0243844 (patch)
tree8d81e022f855aad5d29853b56b886d3c6b382c45 /line-log.c
parent05682ee270199fdfbc11883458b3639b2b1577df (diff)
parent279ffad17dcc3b72aa7cb5c73fb7aa8eddeed9da (diff)
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 'line-log.c')
-rw-r--r--line-log.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/line-log.c b/line-log.c
index ecdce08c4b..fa9cfd5bdb 100644
--- a/line-log.c
+++ b/line-log.c
@@ -816,8 +816,8 @@ static void queue_diffs(struct line_log_data *range,
 	assert(commit);
 
 	DIFF_QUEUE_CLEAR(&diff_queued_diff);
-	diff_tree_oid(parent ? &parent->tree->object.oid : NULL,
-		      &commit->tree->object.oid, "", opt);
+	diff_tree_oid(parent ? get_commit_tree_oid(parent) : NULL,
+		      get_commit_tree_oid(commit), "", opt);
 	if (opt->detect_rename) {
 		filter_diffs_for_paths(range, 1);
 		if (diff_might_be_rename())