Convert object iteration callbacks to struct object_id
Convert each_loose_object_fn and each_packed_object_fn to take a pointer to struct object_id. Update the various callbacks. Convert several 40-based constants to use GIT_SHA1_HEXSZ. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
068f85e313
commit
76c1d9a096
@ -2534,17 +2534,17 @@ static void add_objects_in_unpacked_packs(struct rev_info *revs)
|
||||
free(in_pack.array);
|
||||
}
|
||||
|
||||
static int add_loose_object(const unsigned char *sha1, const char *path,
|
||||
static int add_loose_object(const struct object_id *oid, const char *path,
|
||||
void *data)
|
||||
{
|
||||
enum object_type type = sha1_object_info(sha1, NULL);
|
||||
enum object_type type = sha1_object_info(oid->hash, NULL);
|
||||
|
||||
if (type < 0) {
|
||||
warning("loose object at %s could not be examined", path);
|
||||
return 0;
|
||||
}
|
||||
|
||||
add_object_entry(sha1, type, "", 0);
|
||||
add_object_entry(oid->hash, type, "", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user