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
4
cache.h
4
cache.h
@ -1655,7 +1655,7 @@ extern int unpack_object_header(struct packed_git *, struct pack_window **, off_
|
||||
* scratch buffer, but restored to its original contents before
|
||||
* the function returns.
|
||||
*/
|
||||
typedef int each_loose_object_fn(const unsigned char *sha1,
|
||||
typedef int each_loose_object_fn(const struct object_id *oid,
|
||||
const char *path,
|
||||
void *data);
|
||||
typedef int each_loose_cruft_fn(const char *basename,
|
||||
@ -1681,7 +1681,7 @@ int for_each_loose_file_in_objdir_buf(struct strbuf *path,
|
||||
* LOCAL_ONLY flag is set).
|
||||
*/
|
||||
#define FOR_EACH_OBJECT_LOCAL_ONLY 0x1
|
||||
typedef int each_packed_object_fn(const unsigned char *sha1,
|
||||
typedef int each_packed_object_fn(const struct object_id *oid,
|
||||
struct packed_git *pack,
|
||||
uint32_t pos,
|
||||
void *data);
|
||||
|
Reference in New Issue
Block a user