From 7999b2cf772956466baa8925491d6fb1b0963292 Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Tue, 10 Nov 2015 02:22:27 +0000 Subject: Add several uses of get_object_hash. Convert most instances where the sha1 member of struct object is dereferenced to use get_object_hash. Most instances that are passed to functions that have versions taking struct object_id, such as get_sha1_hex/get_oid_hex, or instances that can be trivially converted to use struct object_id instead, are not converted. Signed-off-by: brian m. carlson Signed-off-by: Jeff King --- line-log.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'line-log.c') diff --git a/line-log.c b/line-log.c index 626b22cc3..0d4095045 100644 --- a/line-log.c +++ b/line-log.c @@ -502,7 +502,7 @@ static void fill_blob_sha1(struct commit *commit, struct diff_filespec *spec) unsigned mode; unsigned char sha1[20]; - if (get_tree_entry(commit->object.sha1, spec->path, + if (get_tree_entry(get_object_hash(commit->object), spec->path, sha1, &mode)) die("There is no path %s in the commit", spec->path); fill_filespec(spec, sha1, 1, mode); @@ -824,8 +824,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.sha1 : NULL, - commit->tree->object.sha1, "", opt); + diff_tree_sha1(parent ? get_object_hash(parent->tree->object) : NULL, + get_object_hash(commit->tree->object), "", opt); if (opt->detect_rename) { filter_diffs_for_paths(range, 1); if (diff_might_be_rename()) -- cgit v1.2.1