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

[PATCH 1/2] builtin-commit: fix summary output.

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 16, 2007, 23:11 UTC
Message-ID
<7vy7bugrpc.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<Pine.LNX.4.64.0712151507420.5349@iabervon.org>

Because print_summary() forgot to call diff_setup_done() after futzing with diff output options, it failed to activate recursive diff, which resulted in an incorrect summary.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 * This fixes the "5 files" problem you saw with your commit, which was
   totally bogus (it looked at "git diff-tree HEAD" output that was
   non-recursive, discarding the change of tree t/ itself).  Now it will
   show "7 files" in line with your "git show".
 builtin-commit.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/builtin-commit.c b/builtin-commit.c
index 518ebe0..61770ef 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -662,6 +662,7 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
 	rev.show_root_diff = 1;
 	rev.commit_format = get_commit_format("format:%h: %s");
 	rev.always_show_header = 0;
+	diff_setup_done(&rev.diffopt);
 
 	printf("Created %scommit ", initial_commit ? "initial " : "");
 
-- 
1.5.4.rc0.52.gb90ce
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 5 in “Oddity in git commit summary”
  1. Daniel BarkalowDec 15, 2007
  2. Junio C HamanoDec 16, 2007
  3. 1/2 builtin-commit: fix summary output.Junio C Hamano, Dec 16, 2007
  4. 2/2 builtin-commit: make summary output consistent with statusJunio C Hamano, Dec 16, 2007
  5. Daniel BarkalowDec 17, 2007

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.