Skip to content

Commit

Permalink
--summary output should print immediately after stats.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sean authored and Junio C Hamano committed May 24, 2006
1 parent 36f5b1f commit fad7068
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand All @@ -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]);
}
Expand Down

0 comments on commit fad7068

Please sign in to comment.