Convert struct object to object_id
struct object is one of the major data structures dealing with object IDs. Convert it to use struct object_id instead of an unsigned char array. Convert get_object_hash to refer to the new member as well. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Jeff King <peff@peff.net>
This commit is contained in:

committed by
Jeff King

parent
7999b2cf77
commit
f2fd0760f6
@ -906,7 +906,7 @@ static void test_show_object(struct object *object,
|
||||
|
||||
bitmap_pos = bitmap_position(get_object_hash(*object));
|
||||
if (bitmap_pos < 0)
|
||||
die("Object not in bitmap: %s\n", sha1_to_hex(object->sha1));
|
||||
die("Object not in bitmap: %s\n", oid_to_hex(&object->oid));
|
||||
|
||||
bitmap_set(tdata->base, bitmap_pos);
|
||||
display_progress(tdata->prg, ++tdata->seen);
|
||||
@ -919,7 +919,7 @@ static void test_show_commit(struct commit *commit, void *data)
|
||||
|
||||
bitmap_pos = bitmap_position(get_object_hash(commit->object));
|
||||
if (bitmap_pos < 0)
|
||||
die("Object not in bitmap: %s\n", sha1_to_hex(commit->object.sha1));
|
||||
die("Object not in bitmap: %s\n", oid_to_hex(&commit->object.oid));
|
||||
|
||||
bitmap_set(tdata->base, bitmap_pos);
|
||||
display_progress(tdata->prg, ++tdata->seen);
|
||||
@ -950,13 +950,13 @@ void test_bitmap_walk(struct rev_info *revs)
|
||||
struct ewah_bitmap *bm = lookup_stored_bitmap(st);
|
||||
|
||||
fprintf(stderr, "Found bitmap for %s. %d bits / %08x checksum\n",
|
||||
sha1_to_hex(root->sha1), (int)bm->bit_size, ewah_checksum(bm));
|
||||
oid_to_hex(&root->oid), (int)bm->bit_size, ewah_checksum(bm));
|
||||
|
||||
result = ewah_to_bitmap(bm);
|
||||
}
|
||||
|
||||
if (result == NULL)
|
||||
die("Commit %s doesn't have an indexed bitmap", sha1_to_hex(root->sha1));
|
||||
die("Commit %s doesn't have an indexed bitmap", oid_to_hex(&root->oid));
|
||||
|
||||
revs->tag_objects = 1;
|
||||
revs->tree_objects = 1;
|
||||
|
Reference in New Issue
Block a user