{"thread":{"id":"4262","subject":"[PATCH] --summary output should print immediately after stats.","startedAt":"2006-05-23T09:34:23Z","lastAt":"2006-05-23T09:34:23Z","messageCount":1,"participants":["Sean"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"20531","messageId":"BAYC1-PASMTP112E80721E5343A37893B6AE9B0@CEZ.ICE","threadId":"4262","inReplyTo":null,"subject":"[PATCH] --summary output should print immediately after stats.","fromName":"Sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2006-05-23T09:34:23Z","receivedAt":"2006-05-23T09:34:23Z","isPatch":true,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"\nCurrently the summary is displayed after the patch.  Fix this so\nthat the output order is stat-summary-patch.  As a consequence of\nthe way this is coded, the --summary option will only actually\ndisplay summary data if combined with either the --stat or \n--patch-with-stat option.\n\nSigned-off-by: Sean Estabrooks <seanlkml@sympatico.ca>\n\n---\n\n3060faeb9c9320e12895cb33d25edb4aa4ba072e\n diff.c |    5 ++++-\n 1 files changed, 4 insertions(+), 1 deletions(-)\n\n3060faeb9c9320e12895cb33d25edb4aa4ba072e\ndiff --git a/diff.c b/diff.c\nindex e16e0bf..fa36366 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -1867,6 +1867,9 @@ void diff_flush(struct diff_options *opt\n \t\tshow_stats(diffstat);\n \t\tfree(diffstat);\n \t\tdiffstat = NULL;\n+\t\tif (options->summary)\n+\t\t\tfor (i = 0; i < q->nr; i++)\n+\t\t\t\tdiff_summary(q->queue[i]);\n \t\tputchar(options->line_termination);\n \t}\n \tfor (i = 0; i < q->nr; i++) {\n@@ -1880,7 +1883,7 @@ void diff_flush(struct diff_options *opt\n \t}\n \n \tfor (i = 0; i < q->nr; i++) {\n-\t\tif (options->summary)\n+\t\tif (diffstat && options->summary)\n \t\t\tdiff_summary(q->queue[i]);\n \t\tdiff_free_filepair(q->queue[i]);\n \t}\n-- \n1.3.GIT\n"}]}