git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Git has two ways to count modified lines
@ 2022-03-16 18:08 Laurent Lyaudet
  2022-04-02 16:49 ` Laurent Lyaudet
  0 siblings, 1 reply; 7+ messages in thread
From: Laurent Lyaudet @ 2022-03-16 18:08 UTC (permalink / raw)
  To: git

Hello,

I check the number of lines modified by my commits by hand,
and today I had a surprising count :

1) I commit and get the following count
laurent@laurent-GL73-8SD:~/ReposGit/flow$ git commit
[master c068911] Task CU-21ph8h7 add buttons in PresenceList: "Tout
déplier", "Tout replier", for this the useState for showDetail
(boolean) in Presence is replaced by a useState for showDetails (Set
of ids) in PresenceList; correction missing tr between thead and ths
in PresenceList.
 2 files changed, 88 insertions(+), 48 deletions(-)
 rewrite src/apps/logs/components/PresenceList.js (61%)

2) I check the diff by hand, it doesn't match.
I check on github, it agrees with my manual count.

3) I try to get the same answer again in command-line.
laurent@laurent-GL73-8SD:~/ReposGit/flow$ git log -1 --shortstat
commit c068911547bddbf7bfc4ddc7a68ee8482421ed5c (HEAD -> master,
origin/master, origin/HEAD)
Author: Laurent Lyaudet <laurent.lyaudet@gmail.com>
Date:   Wed Mar 16 18:40:25 2022 +0100    Task CU-21ph8h7 add buttons
in PresenceList: "Tout déplier", "Tout replier",
    for this the useState for showDetail (boolean) in Presence is replaced
    by a useState for showDetails (Set of ids) in PresenceList;
    correction missing tr between thead and ths in PresenceList. 2
files changed, 71 insertions(+), 31 deletions(-)

How comes git has two ways to count modified lines ?
How can I make git output again the same numbers than just after commit ?
How can I check how it computed these numbers in the first place ?

Thanks, best regards,
    Laurent Lyaudet

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-04-05 22:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-16 18:08 Git has two ways to count modified lines Laurent Lyaudet
2022-04-02 16:49 ` Laurent Lyaudet
2022-04-02 21:55   ` René Scharfe
     [not found]     ` <xmqqh779u72a.fsf@gitster.g>
2022-04-04 21:08       ` René Scharfe
2022-04-05  1:58         ` Ævar Arnfjörð Bjarmason
2022-04-05 15:57           ` René Scharfe
2022-04-05 15:57     ` Laurent Lyaudet

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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).