remote.c: hoist read_config into remote_get_1
[gitweb.git] / diff.c
diff --git a/diff.c b/diff.c
index d1bd534caeaf662b0ee0d547d3aa2012310fff57..7500c5509550ccd9a86d620e06c51a71d61f8b6c 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -2093,7 +2093,6 @@ static unsigned char *deflate_it(char *data,
        unsigned char *deflated;
        git_zstream stream;
 
-       memset(&stream, 0, sizeof(stream));
        git_deflate_init(&stream, zlib_compression_level);
        bound = git_deflate_bound(&stream, size);
        deflated = xmalloc(bound);
@@ -4541,7 +4540,7 @@ void diff_flush(struct diff_options *options)
                        show_stats(&diffstat, options);
                if (output_format & DIFF_FORMAT_SHORTSTAT)
                        show_shortstats(&diffstat, options);
-               if (output_format & DIFF_FORMAT_DIRSTAT)
+               if (output_format & DIFF_FORMAT_DIRSTAT && dirstat_by_line)
                        show_dirstat_by_line(&diffstat, options);
                free_diffstat_info(&diffstat);
                separator++;