From e5ec981a4b1d5a3159945f75f600bcf3764e1874 Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Mon, 12 Mar 2018 02:27:36 +0000 Subject: archive: convert sha1_file_to_archive to struct object_id Convert this function to take a pointer to struct object_id and rename it object_file_to_archive. Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- archive.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'archive.c') diff --git a/archive.c b/archive.c index 4942b5632b..da62b2f541 100644 --- a/archive.c +++ b/archive.c @@ -63,16 +63,16 @@ static void format_subst(const struct commit *commit, free(to_free); } -void *sha1_file_to_archive(const struct archiver_args *args, - const char *path, const unsigned char *sha1, - unsigned int mode, enum object_type *type, - unsigned long *sizep) +void *object_file_to_archive(const struct archiver_args *args, + const char *path, const struct object_id *oid, + unsigned int mode, enum object_type *type, + unsigned long *sizep) { void *buffer; const struct commit *commit = args->convert ? args->commit : NULL; path += args->baselen; - buffer = read_sha1_file(sha1, type, sizep); + buffer = read_sha1_file(oid->hash, type, sizep); if (buffer && S_ISREG(mode)) { struct strbuf buf = STRBUF_INIT; size_t size = 0; -- cgit v1.2.3