From 0e804e09938905ed4fe6984f832057267cc5d86f Mon Sep 17 00:00:00 2001 From: Jeff King Date: Tue, 21 Jun 2011 21:27:35 -0400 Subject: 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 --- Documentation/git-archive.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Documentation/git-archive.txt') diff --git a/Documentation/git-archive.txt b/Documentation/git-archive.txt index 726bf63d46..8b0080a977 100644 --- a/Documentation/git-archive.txt +++ b/Documentation/git-archive.txt @@ -110,6 +110,9 @@ tar..command:: 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. ++ +The "tar.gz" and "tgz" formats are defined automatically and default to +`gzip -cn`. You may override them with custom commands. ATTRIBUTES ---------- @@ -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 -- cgit v1.2.1