summaryrefslogtreecommitdiff
path: root/archive-zip.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-07-19 09:45:32 -0700
committerJunio C Hamano <gitster@pobox.com>2011-07-19 09:45:32 -0700
commit765c7e4f3100484ea277f043048631ea93b3127a (patch)
tree91a53c7e06519ef787bba28b4fbb2d9e734b9049 /archive-zip.c
parent17a403c8ce0e9c73a88be329e9e0d623bf25a16e (diff)
parent7b97730b764cac823531ccd14669f9c5b45496dc (diff)
downloadgit-765c7e4f3100484ea277f043048631ea93b3127a.tar.gz
Merge branch 'jk/archive-tar-filter'
* jk/archive-tar-filter: upload-archive: allow user to turn off filters archive: provide builtin .tar.gz filter archive: implement configurable tar filters archive: refactor file extension format-guessing archive: move file extension format-guessing lower archive: pass archiver struct to write_archive callback archive: refactor list of archive formats archive-tar: don't reload default config options archive: reorder option parsing and config reading
Diffstat (limited to 'archive-zip.c')
-rw-r--r--archive-zip.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/archive-zip.c b/archive-zip.c
index 72d55a58ac..02d1f3787a 100644
--- a/archive-zip.c
+++ b/archive-zip.c
@@ -261,7 +261,8 @@ static void dos_time(time_t *time, int *dos_date, int *dos_time)
*dos_time = t->tm_sec / 2 + t->tm_min * 32 + t->tm_hour * 2048;
}
-int write_zip_archive(struct archiver_args *args)
+static int write_zip_archive(const struct archiver *ar,
+ struct archiver_args *args)
{
int err;
@@ -278,3 +279,14 @@ int write_zip_archive(struct archiver_args *args)
return err;
}
+
+static struct archiver zip_archiver = {
+ "zip",
+ write_zip_archive,
+ ARCHIVER_WANT_COMPRESSION_LEVELS|ARCHIVER_REMOTE
+};
+
+void init_zip_archiver(void)
+{
+ register_archiver(&zip_archiver);
+}