diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2015-11-10 02:22:29 +0000 |
---|---|---|
committer | Jeff King <peff@peff.net> | 2015-11-20 08:02:05 -0500 |
commit | ed1c9977cb1b63e4270ad8bdf967a2d02580aa08 (patch) | |
tree | f5b52ccae09103672c62c1c11ff0bddc78199829 /pack-bitmap.c | |
parent | f2fd0760f62e79609fef7bfd7ecebb002e8e4ced (diff) | |
download | git-ed1c9977cb1b63e4270ad8bdf967a2d02580aa08.tar.gz |
Remove get_object_hash.
Convert all instances of get_object_hash to use an appropriate reference
to the hash member of the oid member of struct object. This provides no
functional change, as it is essentially a macro substitution.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'pack-bitmap.c')
-rw-r--r-- | pack-bitmap.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/pack-bitmap.c b/pack-bitmap.c index 1ee354f39f..cb9c622803 100644 --- a/pack-bitmap.c +++ b/pack-bitmap.c @@ -397,7 +397,7 @@ static int ext_index_add_object(struct object *object, const char *name) int hash_ret; int bitmap_pos; - hash_pos = kh_put_sha1_pos(eindex->positions, get_object_hash(*object), &hash_ret); + hash_pos = kh_put_sha1_pos(eindex->positions, object->oid.hash, &hash_ret); if (hash_ret > 0) { if (eindex->count >= eindex->alloc) { eindex->alloc = (eindex->alloc + 16) * 3 / 2; @@ -423,7 +423,7 @@ static void show_object(struct object *object, const struct name_path *path, struct bitmap *base = data; int bitmap_pos; - bitmap_pos = bitmap_position(get_object_hash(*object)); + bitmap_pos = bitmap_position(object->oid.hash); if (bitmap_pos < 0) { char *name = path_name(path, last); @@ -466,11 +466,11 @@ static int should_include(struct commit *commit, void *_data) struct include_data *data = _data; int bitmap_pos; - bitmap_pos = bitmap_position(get_object_hash(commit->object)); + bitmap_pos = bitmap_position(commit->object.oid.hash); if (bitmap_pos < 0) bitmap_pos = ext_index_add_object((struct object *)commit, NULL); - if (!add_to_include_set(data, get_object_hash(commit->object), bitmap_pos)) { + if (!add_to_include_set(data, commit->object.oid.hash, bitmap_pos)) { struct commit_list *parent = commit->parents; while (parent) { @@ -506,7 +506,7 @@ static struct bitmap *find_objects(struct rev_info *revs, roots = roots->next; if (object->type == OBJ_COMMIT) { - khiter_t pos = kh_get_sha1(bitmap_git.bitmaps, get_object_hash(*object)); + khiter_t pos = kh_get_sha1(bitmap_git.bitmaps, object->oid.hash); if (pos < kh_end(bitmap_git.bitmaps)) { struct stored_bitmap *st = kh_value(bitmap_git.bitmaps, pos); @@ -548,7 +548,7 @@ static struct bitmap *find_objects(struct rev_info *revs, int pos; roots = roots->next; - pos = bitmap_position(get_object_hash(*object)); + pos = bitmap_position(object->oid.hash); if (pos < 0 || base == NULL || !bitmap_get(base, pos)) { object->flags &= ~UNINTERESTING; @@ -593,7 +593,7 @@ static void show_extended_objects(struct bitmap *objects, continue; obj = eindex->objects[i]; - show_reach(get_object_hash(*obj), obj->type, 0, eindex->hashes[i], NULL, 0); + show_reach(obj->oid.hash, obj->type, 0, eindex->hashes[i], NULL, 0); } } @@ -650,7 +650,7 @@ static int in_bitmapped_pack(struct object_list *roots) struct object *object = roots->item; roots = roots->next; - if (find_pack_entry_one(get_object_hash(*object), bitmap_git.pack) > 0) + if (find_pack_entry_one(object->oid.hash, bitmap_git.pack) > 0) return 1; } @@ -680,7 +680,7 @@ int prepare_bitmap_walk(struct rev_info *revs) struct object *object = pending_e[i].item; if (object->type == OBJ_NONE) - parse_object_or_die(get_object_hash(*object), NULL); + parse_object_or_die(object->oid.hash, NULL); while (object->type == OBJ_TAG) { struct tag *tag = (struct tag *) object; @@ -692,7 +692,7 @@ int prepare_bitmap_walk(struct rev_info *revs) if (!tag->tagged) die("bad tag"); - object = parse_object_or_die(get_object_hash(*tag->tagged), NULL); + object = parse_object_or_die(tag->tagged->oid.hash, NULL); } if (object->flags & UNINTERESTING) @@ -904,7 +904,7 @@ static void test_show_object(struct object *object, struct bitmap_test_data *tdata = data; int bitmap_pos; - bitmap_pos = bitmap_position(get_object_hash(*object)); + bitmap_pos = bitmap_position(object->oid.hash); if (bitmap_pos < 0) die("Object not in bitmap: %s\n", oid_to_hex(&object->oid)); @@ -917,7 +917,7 @@ static void test_show_commit(struct commit *commit, void *data) struct bitmap_test_data *tdata = data; int bitmap_pos; - bitmap_pos = bitmap_position(get_object_hash(commit->object)); + bitmap_pos = bitmap_position(commit->object.oid.hash); if (bitmap_pos < 0) die("Object not in bitmap: %s\n", oid_to_hex(&commit->object.oid)); @@ -943,7 +943,7 @@ void test_bitmap_walk(struct rev_info *revs) bitmap_git.version, bitmap_git.entry_count); root = revs->pending.objects[0].item; - pos = kh_get_sha1(bitmap_git.bitmaps, get_object_hash(*root)); + pos = kh_get_sha1(bitmap_git.bitmaps, root->oid.hash); if (pos < kh_end(bitmap_git.bitmaps)) { struct stored_bitmap *st = kh_value(bitmap_git.bitmaps, pos); |