archive: make zip compression level independent from core git
[git/git.git] / builtin-archive.c
index d5e3af8..cff6ce7 100644 (file)
@@ -185,9 +185,10 @@ int parse_archive_args(int argc, const char **argv, const struct archiver **ar,
        if (!*ar)
                die("Unknown archive format '%s'", format);
 
+       args->compression_level = Z_DEFAULT_COMPRESSION;
        if (compression_level != -1) {
                if ((*ar)->flags & USES_ZLIB_COMPRESSION)
-                       zlib_compression_level = compression_level;
+                       args->compression_level = compression_level;
                else {
                        die("Argument not supported for format '%s': -%d",
                                        format, compression_level);