path: root/Documentation/git-archive.txt
diff options
authorJeff King <>2011-06-22 01:27:35 (GMT)
committerJunio C Hamano <>2011-06-22 18:12:35 (GMT)
commit0e804e09938905ed4fe6984f832057267cc5d86f (patch)
tree1a3e8a37bc1324eecf2a4b73acd66576690ef295 /Documentation/git-archive.txt
parent767cf4579f0e34a3cfc6704d5c313842321dfafa (diff)
archive: provide builtin .tar.gz filter
This works exactly as if the user had configured it via: [tar "tgz"] command = gzip -cn [tar "tar.gz"] command = gzip -cn but since it is so common, it's convenient to have it builtin without the user needing to do anything. Signed-off-by: Jeff King <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/git-archive.txt')
1 files changed, 11 insertions, 0 deletions
diff --git a/Documentation/git-archive.txt b/Documentation/git-archive.txt
index 726bf63..8b0080a 100644
--- a/Documentation/git-archive.txt
+++ b/Documentation/git-archive.txt
@@ -110,6 +110,9 @@ tar.<format>.command::
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.
@@ -143,6 +146,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