summaryrefslogtreecommitdiff
path: root/archive-tar.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2011-06-21 21:27:35 -0400
committerJunio C Hamano <gitster@pobox.com>2011-06-22 11:12:35 -0700
commit0e804e09938905ed4fe6984f832057267cc5d86f (patch)
tree1a3e8a37bc1324eecf2a4b73acd66576690ef295 /archive-tar.c
parent767cf4579f0e34a3cfc6704d5c313842321dfafa (diff)
downloadgit-0e804e09938905ed4fe6984f832057267cc5d86f.tar.gz
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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'archive-tar.c')
-rw-r--r--archive-tar.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/archive-tar.c b/archive-tar.c
index 5c30747f9c..f470ebea12 100644
--- a/archive-tar.c
+++ b/archive-tar.c
@@ -357,6 +357,8 @@ void init_tar_archiver(void)
int i;
register_archiver(&tar_archiver);
+ tar_filter_config("tar.tgz.command", "gzip -cn", NULL);
+ tar_filter_config("tar.tar.gz.command", "gzip -cn", NULL);
git_config(git_tar_config, NULL);
for (i = 0; i < nr_tar_filters; i++) {
/* omit any filters that never had a command configured */