[PATCH] --summary output should print immediately after stats.
From: Sean <hidden>
Date: 2016-06-15 22:42:27
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Sean <hidden>
Date: 2016-06-15 22:42:27
Subsystem:
the rest · Maintainer:
Linus Torvalds
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 <redacted> --- 3060faeb9c9320e12895cb33d25edb4aa4ba072e diff.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) 3060faeb9c9320e12895cb33d25edb4aa4ba072e
diff --git a/diff.c b/diff.c
index e16e0bf..fa36366 100644
--- a/diff.c
+++ b/diff.c@@ -1867,6 +1867,9 @@ void diff_flush(struct diff_options *opt 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++) {
@@ -1880,7 +1883,7 @@ void diff_flush(struct diff_options *opt } 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]); }
--
1.3.GIT