From 767cf4579f0e34a3cfc6704d5c313842321dfafa Mon Sep 17 00:00:00 2001 From: Jeff King Date: Tue, 21 Jun 2011 21:26:31 -0400 Subject: archive: implement configurable tar filters It's common to pipe the tar output produce by "git archive" through gzip or some other compressor. Locally, this can easily be done by using a shell pipe. When requesting a remote archive, though, it cannot be done through the upload-archive interface. This patch allows configurable tar filters, so that one could define a "tar.gz" format that automatically pipes tar output through gzip. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- Documentation/git-archive.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Documentation') diff --git a/Documentation/git-archive.txt b/Documentation/git-archive.txt index 9c750e2444..726bf63d46 100644 --- a/Documentation/git-archive.txt +++ b/Documentation/git-archive.txt @@ -101,6 +101,16 @@ tar.umask:: details. If `--remote` is used then only the configuration of the remote repository takes effect. +tar..command:: + This variable specifies a shell command through which the tar + output generated by `git archive` should be piped. The command + is executed using the shell with the generated tar file on its + standard input, and should produce the final output on its + standard output. Any compression-level options will be passed + to the command (e.g., "-9"). An output file with the same + extension as `` will be use this format if no other + format is given. + ATTRIBUTES ---------- @@ -149,6 +159,12 @@ git archive -o latest.zip HEAD:: commit on the current branch. Note that the output format is inferred by the extension of the output file. +git config tar.tar.xz.command "xz -c":: + + Configure a "tar.xz" format for making LZMA-compressed tarfiles. + You can use it specifying `--format=tar.xz`, or by creating an + output file like `-o foo.tar.xz`. + SEE ALSO -------- -- cgit v1.2.3