aboutsummaryrefslogtreecommitdiff
path: root/line-log.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2015-11-10 02:22:27 +0000
committerJeff King <peff@peff.net>2015-11-20 08:02:05 -0500
commit7999b2cf772956466baa8925491d6fb1b0963292 (patch)
tree34a3bf75c3cdc621d732107f53181ff28c0550a4 /line-log.c
parent3c4270107fec2c1d85b7b1a6f8b0aeebf3193b28 (diff)
downloadgit-7999b2cf772956466baa8925491d6fb1b0963292.tar.gz
git-7999b2cf772956466baa8925491d6fb1b0963292.tar.xz
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 <sandals@crustytoothpaste.net> Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'line-log.c')
-rw-r--r--line-log.c6
1 files changed, 3 insertions, 3 deletions
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())