Code

Merge branch 'jc/streaming-filter'
[git.git] / Documentation / git-archive.txt
index 9c750e24446b58efc2bd8d5e44566d060eaa353a..1320c873ad61281ef33891170da8683dc785f011 100644 (file)
@@ -101,6 +101,25 @@ tar.umask::
        details.  If `--remote` is used then only the configuration of
        the remote repository takes effect.
 
+tar.<format>.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 `<format>` will be use this format if no other
+       format is given.
++
+The "tar.gz" and "tgz" formats are defined automatically and default to
+`gzip -cn`. You may override them with custom commands.
+
+tar.<format>.remote::
+       If true, enable `<format>` for use by remote clients via
+       linkgit:git-upload-archive[1]. Defaults to false for
+       user-defined formats, but true for the "tar.gz" and "tgz"
+       formats.
+
 ATTRIBUTES
 ----------
 
@@ -133,6 +152,14 @@ git archive --format=tar --prefix=git-1.4.0/ v1.4.0 | gzip >git-1.4.0.tar.gz::
 
        Create a compressed tarball for v1.4.0 release.
 
+git archive --format=tar.gz --prefix=git-1.4.0/ v1.4.0 >git-1.4.0.tar.gz::
+
+       Same as above, but using the builtin tar.gz handling.
+
+git archive --prefix=git-1.4.0/ -o git-1.4.0.tar.gz v1.4.0::
+
+       Same as above, but the format is inferred from the output file.
+
 git archive --format=tar --prefix=git-1.4.0/ v1.4.0{caret}\{tree\} | gzip >git-1.4.0.tar.gz::
 
        Create a compressed tarball for v1.4.0 release, but without a
@@ -149,6 +176,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
 --------