diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2015-11-10 02:22:27 +0000 |
---|---|---|
committer | Jeff King <peff@peff.net> | 2015-11-20 08:02:05 -0500 |
commit | 7999b2cf772956466baa8925491d6fb1b0963292 (patch) | |
tree | 34a3bf75c3cdc621d732107f53181ff28c0550a4 /bisect.c | |
parent | 3c4270107fec2c1d85b7b1a6f8b0aeebf3193b28 (diff) | |
download | git-7999b2cf772956466baa8925491d6fb1b0963292.tar.gz |
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 'bisect.c')
-rw-r--r-- | bisect.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -500,7 +500,7 @@ struct commit_list *filter_skipped(struct commit_list *list, struct commit_list *next = list->next; list->next = NULL; if (0 <= sha1_array_lookup(&skipped_revs, - list->item->object.sha1)) { + get_object_hash(list->item->object))) { if (skipped_first && !*skipped_first) *skipped_first = 1; /* Move current to tried list */ @@ -784,7 +784,7 @@ static void check_merge_bases(int no_checkout) result = get_merge_bases_many(rev[0], rev_nr - 1, rev + 1); for (; result; result = result->next) { - const unsigned char *mb = result->item->object.sha1; + const unsigned char *mb = get_object_hash(result->item->object); if (!hashcmp(mb, current_bad_oid->hash)) { handle_bad_merge_base(); } else if (0 <= sha1_array_lookup(&good_revs, mb)) { @@ -973,7 +973,7 @@ int bisect_next_all(const char *prefix, int no_checkout) exit(4); } - bisect_rev = revs.commits->item->object.sha1; + bisect_rev = get_object_hash(revs.commits->item->object); if (!hashcmp(bisect_rev, current_bad_oid->hash)) { exit_if_skipped_commits(tried, current_bad_oid); |