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
52
votes
3 answers

Git diff --stat explanation

Git's pull output has been explained here fairly well. In spite of this I'm still unsure exactly what the text graph relates to. For example: git diff --stat master HEAD^ Outputs (truncated): Site/index.php | 118 ++-- While the number of lines…
LukasWildas
  • 539
  • 1
  • 4
  • 5
13
votes
4 answers

Git Merge: What do the pluses mean?

I ran "git merge" from Terminal on Mac OS X to merge a branch into my master and receive output that looks like: spec/models/user_spec.rb 57 ++++++++++++++++++++ What does the "57 ++++++++++++++++++++" mean? Is that how many times I…
Trent Scott
  • 2,018
  • 8
  • 34
  • 50
10
votes
2 answers

show fetched commits after git pull --rebase

Is there a way to see what commits have been pulled in from the remote repository after you do a git pull --rebase? In other words: git pull will show a summary of changed files at the end (like git diff --stat). Git pull --rebase does not. How can…
Q-BiC
  • 153
  • 1
  • 7
7
votes
1 answer

Using diffstat with subversion?

Could anyone give me examples, how I could use diffstat with subversion? I mean, using diffstat to analyze and produce statistics about one or multiple commits. NOTE: Linux commandline examples are OK ;)
java.is.for.desktop
  • 10,748
  • 12
  • 69
  • 103
4
votes
0 answers

git status with number of lines changed

i want git status to also list number of lines changed, like those + and - on git pull: example) ❯ LANG=c git status On branch develop Your branch is up to date with 'upstream/develop'. Changes not staged for commit: (use "git add ..." to…
scarf
  • 303
  • 3
  • 9
2
votes
1 answer

How to show number of lines added and deleted for every file in git log and git diff?

If I do git log --stat or git diff with --stat, I get something like: myproj/src/__main__.py | 1 + myproj/{ => src}/utils.py | 0 myproj/{ => src}/web.py …
Flux
  • 9,805
  • 5
  • 46
  • 92
2
votes
1 answer

How to Git diff two branches but showing an output similar to that of Git commit?

If I do: $ git checkout some_branch [...] $ git diff another_branch It'll show a large diff between the branches. Now there's a simplified, smaller1 diff shown after applying a commit, or merge, I guess cherry picks too. How can I show that…
1737973
  • 159
  • 18
  • 42
2
votes
2 answers

what does "insertions and deletions" mean and how the numbers are calculated

when use diffStat or git diff to analyze the code,it often shows the result below, 71 files changed, 10938 insertions(+), 947 deletions(-), 3103 modifications(!), 3027 unchanged lines(=) but I do not know what the insertions and deletions…
HaiBin
  • 43
  • 7
2
votes
3 answers

What do the git statistics mean?

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 …
sivann
  • 2,083
  • 4
  • 29
  • 44
1
vote
1 answer

Git diff stat changes when piped

If I do: git diff --stat master I will have something like: .gitignore | 11 +- BUGS | 1 + Makefile | 907…
1737973
  • 159
  • 18
  • 42
1
vote
1 answer

'svn diff' not showing differences for deleted files under directory

I have directory structure as below in svn Dir1/file1 /file2 /file3 Dir2/file1 /file2 I have deleted the directory Dir1 and committed the changes to svn using svn rm Dir1 and svn ci -m"deleted dir" .. If I check the svn log I can see…
Dinesh Reddy
  • 775
  • 1
  • 11
  • 25
1
vote
1 answer

How to add different colors to mercurial template command?

What I want: A command that prints number of added (+) and removed (-) from change log, where the added portion(+) written in green and deleted portion (-) written in red. What I have currently: hg log -T {diffstat} prints what I want (+20/-31:)…
hello_harry
  • 1,265
  • 2
  • 14
  • 24
1
vote
1 answer

in Shell, How to insert a substring if not found in string

I want changes_summary to always be in format files changed, insertion(+), deletions(-) where and are some numbers, but diffstat misses insertions and/or deletions part if and/or is zero, I tried to make it print as…
rodee
  • 3,233
  • 5
  • 34
  • 70
1
vote
2 answers

How to make diffstat count removed and newly added files to LOC count?

diff -ur dir1 dir2 | diffstat this is similar to git diff --stat, but diffstat is ignoring "Only in dir1" and "Only in dir2" files, whereas git diff adds it to deletion and insertion counts respectively. Is there a way to make diffstat to do the…
rodee
  • 3,233
  • 5
  • 34
  • 70
1
vote
0 answers

Calculating Lines of Code metric for Svn repo ( lines added , lines modified , lines deleted)

I want to generate a LOC(Lines of code) metric for my svn repo given a date range: Date: July 2012 Lines Added: 38,719 Lines Modified: 22391 Lines Deleted: 9512 Total: 70621 I have explored tools like Statsvn, svnplot, fisheye,…
user1146952
  • 31
  • 1
  • 2
1
2