20 questions
1 vote
0 answers
57 views
Can I get git diff --stat to count character rather than lines added/removed?
I'm writing a patch for my code which mainly replaces contents within lines. I want the git diff --stat (and later git log --stat) to show me the numbers of characters, rather than lines, added or ...
6 votes
0 answers
1k views
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 ...
1 vote
1 answer
378 views
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 ...
2 votes
1 answer
3k views
How to show number of lines added and deleted for every file in git log and git diff?
If I do git log <commit-id> --stat or git diff with --stat, I get something like: myproj/src/__main__.py | 1 + myproj/{ => src}/utils.py ...
1 vote
1 answer
129 views
Git diff stat changes when piped
If I do: git diff --stat master I will have something like: .gitignore | 11 +- BUGS | 1 + Makefile ...
2 votes
1 answer
369 views
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 ...
1 vote
1 answer
871 views
'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"...
2 votes
2 answers
2k views
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 ...
1 vote
1 answer
153 views
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 ...
1 vote
1 answer
183 views
in Shell, How to insert a substring if not found in string
I want changes_summary to always be in format <x> files changed, <y> insertion(+), <z> deletions(-) where <x> <y> and <z> are some numbers, but diffstat misses ...
1 vote
2 answers
394 views
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 ...
1 vote
0 answers
3k views
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 ...
1 vote
1 answer
2k views
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(-)...
10 votes
2 answers
1k views
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 ...
1 vote
2 answers
616 views
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 <[email protected]&...