From: Sean Date: Tue, 23 May 2006 09:34:23 +0000 (-0400) Subject: --summary output should print immediately after stats. X-Git-Tag: v1.4.0-rc1~80 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=fad70686b25c414b6224406d42a4dfb7c4136e85;p=git.git --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 Signed-off-by: Junio C Hamano --- diff --git a/diff.c b/diff.c index 3a2a175c7..77c09a87b 100644 --- a/diff.c +++ b/diff.c @@ -1988,6 +1988,9 @@ void diff_flush(struct diff_options *options) show_stats(diffstat); free(diffstat); diffstat = NULL; + if (options->summary) + for (i = 0; i < q->nr; i++) + diff_summary(q->queue[i]); putchar(options->line_termination); } for (i = 0; i < q->nr; i++) { @@ -2001,7 +2004,7 @@ void diff_flush(struct diff_options *options) } for (i = 0; i < q->nr; i++) { - if (options->summary) + if (diffstat && options->summary) diff_summary(q->queue[i]); diff_free_filepair(q->queue[i]); }