Re: Oddity in git commit summary

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Daniel Barkalow <barkalow@xxxxxxxxxxxx> 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)) {
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux