--summary output should print immediately after stats.
Currently the summary is displayed after the patch. Fix this so that the output order is stat-summary-patch. As a consequence of the way this is coded, the --summary option will only actually display summary data if combined with either the --stat or --patch-with-stat option. Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca> Signed-off-by: Junio C Hamano <junkio@cox.net>
Sean committed
May 23, 2006 at 05:34 UTC
fad70686b25c414b6224406d42a4dfb7c4136e85
1 file changed
+4
-1
diff.c
+4
-1
@@ -1988,6 +1988,9 @@ void diff_flush(struct diff_options *options)
1988
show_stats(diffstat);
1989
free(diffstat);
1990
diffstat = NULL;
1991
+ if (options->summary)
1992
+ for (i = 0; i < q->nr; i++)
1993
+ diff_summary(q->queue[i]);
1994
putchar(options->line_termination);
1995
}
1996
for (i = 0; i < q->nr; i++) {
@@ -2001,7 +2004,7 @@ void diff_flush(struct diff_options *options)
2004
}
2005
2006
for (i = 0; i < q->nr; i++) {
2004
- if (options->summary)
2007
+ if (diffstat && options->summary)
2008
diff_summary(q->queue[i]);
2009
diff_free_filepair(q->queue[i]);
2010
}