What do the git statistics mean?

179 Views Asked by At

I probably don't know how to search for this, but can't find what the git stats that are shown when you do a git pull or a "git show --stat 947a403" (--stat is not in the manpage) It's supposed to be line ins/del but they don't really match.

 TODO                           |    6 +++-
 htdocs/main/js/ek.balcony.js   |   18 +++++++---
 htdocs/main/js/ek.face.js      |    3 +-
 htdocs/main/js/ek.main.js      |    2 +-
 htdocs/main/js/ek.tsakiseis.js |    2 +-
 octave/.point2tsak.m.kate-swp  |  Bin 66 -> 0 bytes
 octave/initialiseEdf-balc.m    |   68 ------------------------------------
 octave/initialiseEdfbalc.m     |   75 ----------------------------------------
 8 files changed, 22 insertions(+), 152 deletions(-)

What are these numbers and the + and - ? Is this something like a levenshtein distance?

3

There are 3 best solutions below

0
sivann On BEST ANSWER

Well, the manual is here: http://invisible-island.net/diffstat/ or diffstat(1) The counts are as reported by diff. The difference between +/- and the count is just rounding.

3
TheCompWiz On
TODO ... 3 additions 1 deletion
htdocs/main/js/ek.balcony.js ... 7 additions 3 deletions
htdocs/main/js/ek.face.js ... 1 addition 1 deletion

As for the number... I'm not 100% sure. It may be a line-count as to how many lines were added/deleted.

2
robrich On

These show the files changed and the lines added and removed in each. In your example, 3 files changed, and in ek.face.js, one line was added, one line was removed.