X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=archive-tar.c;h=c0d95dab0d965ff0ae961d72d7eae4c021c5c05a;hb=be6042cfa59358b733b6f9ba05bcbc317998d9fe;hp=66fe3e375b545613faba4e051dc41c1acb5d8cee;hpb=5bd148bfe8a4f2df8487e029cd4ee6809bc4c963;p=git.git diff --git a/archive-tar.c b/archive-tar.c index 66fe3e375..c0d95dab0 100644 --- a/archive-tar.c +++ b/archive-tar.c @@ -17,6 +17,7 @@ static unsigned long offset; static time_t archive_time; static int tar_umask = 002; static int verbose; +static const struct commit *commit; /* writes out the whole block, but only if it is full */ static void write_if_needed(void) @@ -285,7 +286,8 @@ static int write_tar_entry(const unsigned char *sha1, buffer = NULL; size = 0; } else { - buffer = convert_sha1_file(path.buf, sha1, mode, &type, &size); + buffer = sha1_file_to_archive(path.buf, sha1, mode, &type, + &size, commit); if (!buffer) die("cannot read %s", sha1_to_hex(sha1)); } @@ -304,6 +306,7 @@ int write_tar_archive(struct archiver_args *args) archive_time = args->time; verbose = args->verbose; + commit = args->commit; if (args->commit_sha1) write_global_extended_header(args->commit_sha1);