mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <>
To: Norbert Kiesel <>
Cc: Git Mailing List <>
Subject: Re: [git 2.26] stat counts reported by commit and log are different
Date: Thu, 9 Apr 2020 09:59:59 -0400	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Wed, Apr 08, 2020 at 07:04:02PM -0700, Norbert Kiesel wrote:

> % git commit -m 'major code cleanup for SCIMPatchOperationUtil'
> [nkiesel/nextrelease/SCIM_2 d4db6f6d83f] major code cleanup for
> SCIMPatchOperationUtil
>  1 file changed, 2106 insertions(+), 3367 deletions(-)
>  rewrite utils/ (74%)

The commit summary diff is done with the break-detection option on. You
can tell it kicked in here because of the "rewrite" line. What that
means is that the changes to the file were so extensive that Git decided
the file had been totally rewritten, and broke it into a separate
add/delete. That has two implications:

  - we'd consider it a candidate for rename detection; that didn't
    happen here because there were no other files added or deleted to
    serve as source/dest candidates

  - the diff will be reported as a complete removal of the old content
    and the addition of the new, _even for lines that were the same_

> % git log --stat -1
> commit d4db6f6d83f (HEAD -> nkiesel/nextrelease/SCIM_2)
> Author: Norbert Kiesel <>
> Date:   Wed Apr 8 18:49:27 2020 -0700
>     major code cleanup for SCIMPatchOperationUtil
>  utils/ | 3807
> +++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------------------------------------------------
>  1 file changed, 1273 insertions(+), 2534 deletions(-)

But in git-log break-detection isn't on by default. Try adding "-B" and
you will get the other numbers.

Try also adding "-p" to see the whole-diff in action.


  reply	other threads:[~2020-04-09 14:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-09  2:04 [git 2.26] stat counts reported by commit and log are different Norbert Kiesel
2020-04-09 13:59 ` Jeff King [this message]
2020-04-09 21:58   ` Norbert Kiesel
2020-04-09 22:47     ` Jeff King
2020-04-09 22:55       ` Junio C Hamano
2020-04-09 23:12         ` Jeff King

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:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* 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.
Code repositories for project(s) associated with this public inbox

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 read-only IMAP folder(s) and NNTP newsgroup(s).