diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-09-10 00:14:50 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-09-10 00:14:50 -0700 |
commit | 6972ab7ae10a205bbc05b98408a36403915a9c39 (patch) | |
tree | 755ab51db764a7d35e9546eb30a5d4440291b014 /archive-tar.c | |
parent | 9784c5c53e0765bc9a0c973ab10aaf0734d535c3 (diff) | |
parent | 20fbfd869fe8faae0ce4573b60b540024db7385d (diff) | |
download | git-6972ab7ae10a205bbc05b98408a36403915a9c39.tar.gz |
Merge branch 'rs/archive'
* rs/archive:
archive - leakfix for format_subst()
Define NO_MEMMEM on Darwin as it lacks the function
archive: rename attribute specfile to export-subst
archive: specfile syntax change: "$Format:%PLCHLDR$" instead of just "%PLCHLDR" (take 2)
add memmem()
Remove unused function convert_sha1_file()
archive: specfile support (--pretty=format: in archive files)
Export format_commit_message()
Diffstat (limited to 'archive-tar.c')
-rw-r--r-- | archive-tar.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/archive-tar.c b/archive-tar.c index 66fe3e375b..c0d95dab0d 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); |