git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] --summary output should print immediately after stats.

From
Sean <seanlkml@sympatico.ca>
Date
May 23, 2006, 09:34 UTC
Message-ID
<BAYC1-PASMTP112E80721E5343A37893B6AE9B0@CEZ.ICE>

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>
---
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
Message 1 of 1 in “--summary output should print immediately after stats.”
  1. --summary output should print immediately after stats.Sean, May 23, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.