Questions tagged [diffstat]

diffstat can refer to the diffstat program, or to git diff --stat output; use this tag for questions about either.

See https://invisible-island.net/diffstat/ for the history of the diffstat program. Git's diff --stat is based on the same general idea: that, given some sort of patch, we'd like a summary of changes that the patch makes: what files are affected, and to what extent.

19 questions
1
vote
1 answer

How to have git stats on a diff file?

While in a git repository, I can do : git log --oneline --stat and I'll have a nice output looking like: ca0ab77 commit message a/file/changed | 19 ------------------- 1 file changed, 19 deletions(-) In my case, I am working outside a git…
Mathieu Nls
  • 2,285
  • 2
  • 17
  • 32
1
vote
2 answers

Why does git's diffstat only show lines that have been added/deleted but not lines modified?

I am wondering why git log only shows lines added/deleted, but no modified lines. For example,I type git log commit1..commit2 --stat the result is commit 5b5h5......... Author: cc Date: Wed May 28 13:36:34 2014 +0800 …
Venus
  • 1,184
  • 2
  • 13
  • 32
0
votes
1 answer

How to force diffstat to always show number of inserts, deletes and modifications even for zero values?

I'm doing a diffstat on my merge to see how many inserts, deletes and modifications I made like so: git show 526162eed6 --first-parent --unified=0 | diffstat -m This lists all the files and gives a summary at the end: a/b/c | 10 ++++++++++ a/b/d | …
PhD
  • 11,202
  • 14
  • 64
  • 112
0
votes
2 answers

Using sed to extract result from diffstat

I am trying to use sed to get the number of insertions/deletions from diff stat. For example, diffstat gives something like "1 file changed, 2 insertions(+), 1 deletion(-)". How can I retrieve "2" from diffstat using sed? I can't seem to figure it…
user3089610
1
2