From: Junio C Hamano <gitster@pobox.com>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: git@vger.kernel.org
Subject: Re: Oddity in git commit summary
Date: Sun, 16 Dec 2007 15:01:39 -0800 [thread overview]
Message-ID: <7vhciii6r0.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)")
Daniel Barkalow <barkalow@iabervon.org> writes:
> I just noticed that I got a strange summary from git commit -a --amend
> with the current master. It said:
>
> Created commit f16cb29: Build in checkout
> 5 files changed, 482 insertions(+), 299 deletions(-)
> create mode 100644 builtin-checkout.c
> delete mode 100755 git-checkout.sh
>
> But git show --stat says:
> 7 files changed, 780 insertions(+), 306 deletions(-)
>
> And git show --stat -C says:
> 6 files changed, 482 insertions(+), 8 deletions(-)
Because "git status" has -B -M and your second one does not pass any, I
would not worry about the first two differences. But 5 vs 6 seems
funny.
print_summary() is broken.
diff --git a/builtin-commit.c b/builtin-commit.c
index 518ebe0..8435702 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -663,6 +665,8 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
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 " : "");
if (!log_tree_commit(&rev, commit)) {
next prev parent reply other threads:[~2007-12-16 23:02 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 [this message]
2007-12-16 23:11 ` [PATCH 1/2] builtin-commit: fix summary output Junio C Hamano
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=7vhciii6r0.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).