diff options
Diffstat (limited to 'line-log.c')
-rw-r--r-- | line-log.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/line-log.c b/line-log.c index a23b910471..2588ce0767 100644 --- a/line-log.c +++ b/line-log.c @@ -500,12 +500,12 @@ static struct commit *check_single_commit(struct rev_info *revs) static void fill_blob_sha1(struct commit *commit, struct diff_filespec *spec) { unsigned mode; - unsigned char sha1[20]; + struct object_id oid; if (get_tree_entry(commit->object.oid.hash, spec->path, - sha1, &mode)) + oid.hash, &mode)) die("There is no path %s in the commit", spec->path); - fill_filespec(spec, sha1, 1, mode); + fill_filespec(spec, &oid, 1, mode); return; } @@ -819,8 +819,8 @@ static void queue_diffs(struct line_log_data *range, assert(commit); DIFF_QUEUE_CLEAR(&diff_queued_diff); - diff_tree_sha1(parent ? parent->tree->object.oid.hash : NULL, - commit->tree->object.oid.hash, "", opt); + diff_tree_oid(parent ? &parent->tree->object.oid : NULL, + &commit->tree->object.oid, "", opt); if (opt->detect_rename) { filter_diffs_for_paths(range, 1); if (diff_might_be_rename()) @@ -1125,6 +1125,7 @@ static int process_ranges_ordinary_commit(struct rev_info *rev, struct commit *c changed = process_all_files(&parent_range, rev, &queue, range); if (parent) add_line_range(rev, parent, parent_range); + free_line_log_data(parent_range); return changed; } |