Merge branch 'jn/gitweb-search'
[gitweb.git] / Documentation / git-archive.txt
index bf5037ab2a5042a20e9cb603f0831bb186ac3b74..1320c873ad61281ef33891170da8683dc785f011 100644 (file)
@@ -98,7 +98,27 @@ tar.umask::
        tar archive entries.  The default is 0002, which turns off the
        world write bit.  The special value "user" indicates that the
        archiving user's umask will be used instead.  See umask(2) for
-       details.
+       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
 ----------
@@ -132,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
@@ -148,19 +176,17 @@ 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
 --------
 linkgit:gitattributes[5]
 
-Author
-------
-Written by Franck Bui-Huu and Rene Scharfe.
-
-Documentation
---------------
-Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
-
 GIT
 ---
 Part of the linkgit:git[1] suite