From: Junio C Hamano <gitster@pobox.com>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: git@vger.kernel.org
Subject: [PATCH 1/2] builtin-commit: fix summary output.
Date: Sun, 16 Dec 2007 15:11:59 -0800 [thread overview]
Message-ID: <7vy7bugrpc.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0712151507420.5349@iabervon.org> (Daniel Barkalow's message of "Sat, 15 Dec 2007 15:29:18 -0500 (EST)")
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
next prev parent reply other threads:[~2007-12-16 23:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-15 20:29 Oddity in git commit summary Daniel Barkalow
2007-12-16 23:01 ` Junio C Hamano
2007-12-16 23:11 ` Junio C Hamano [this message]
2007-12-16 23:12 ` [PATCH 2/2] builtin-commit: make summary output consistent with status Junio C Hamano
2007-12-17 3:42 ` Daniel Barkalow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vy7bugrpc.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=barkalow@iabervon.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).