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
@ -409,20 +409,20 @@ static int batch_object_cb(const unsigned char sha1[20], void *vdata)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int batch_loose_object(const unsigned char *sha1,
|
||||
static int batch_loose_object(const struct object_id *oid,
|
||||
const char *path,
|
||||
void *data)
|
||||
{
|
||||
sha1_array_append(data, sha1);
|
||||
sha1_array_append(data, oid->hash);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int batch_packed_object(const unsigned char *sha1,
|
||||
static int batch_packed_object(const struct object_id *oid,
|
||||
struct packed_git *pack,
|
||||
uint32_t pos,
|
||||
void *data)
|
||||
{
|
||||
sha1_array_append(data, sha1);
|
||||
sha1_array_append(data, oid->hash);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user