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 --- walker.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'walker.c') diff --git a/walker.c b/walker.c index ce2f57abe7..7d1ee30b8e 100644 --- a/walker.c +++ b/walker.c @@ -78,7 +78,7 @@ static int process_commit(struct walker *walker, struct commit *commit) if (commit->object.flags & COMPLETE) return 0; - hashcpy(current_commit_sha1, commit->object.sha1); + hashcpy(current_commit_sha1, get_object_hash(commit->object)); walker_say(walker, "walk %s\n", sha1_to_hex(commit->object.sha1)); @@ -146,7 +146,7 @@ static int process(struct walker *walker, struct object *obj) else { if (obj->flags & COMPLETE) return 0; - walker->prefetch(walker, obj->sha1); + walker->prefetch(walker, get_object_hash(*obj)); } object_list_insert(obj, process_queue_end); @@ -170,13 +170,13 @@ static int loop(struct walker *walker) * the queue because we needed to fetch it first. */ if (! (obj->flags & TO_SCAN)) { - if (walker->fetch(walker, obj->sha1)) { + if (walker->fetch(walker, get_object_hash(*obj))) { report_missing(obj); return -1; } } if (!obj->type) - parse_object(obj->sha1); + parse_object(get_object_hash(*obj)); if (process_object(walker, obj)) return -1; } -- cgit v1.2.1