Code

Make zlib compression level configurable, and change default.
[git.git] / diff.c
diff --git a/diff.c b/diff.c
index afb629e613e0bcd8034e1701e77f7e16229139d4..428ff786ebdbd48a47ae5faf4c65c01e38403ad4 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -583,7 +583,7 @@ static unsigned char *deflate_it(char *data,
        z_stream stream;
 
        memset(&stream, 0, sizeof(stream));
-       deflateInit(&stream, Z_BEST_COMPRESSION);
+       deflateInit(&stream, zlib_compression_level);
        bound = deflateBound(&stream, size);
        deflated = xmalloc(bound);
        stream.next_out = deflated;
@@ -2217,7 +2217,7 @@ static int diff_get_patch_id(struct diff_options *options, unsigned char *sha1)
 
                xpp.flags = XDF_NEED_MINIMAL;
                xecfg.ctxlen = 3;
-               xecfg.flags = 3;
+               xecfg.flags = XDL_EMIT_FUNCNAMES;
                ecb.outf = xdiff_outf;
                ecb.priv = &data;
                xdl_diff(&mf1, &mf2, &xpp, &xecfg, &ecb);