1

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]> Date: Wed May 28 13:36:34 2014 +0800 some commit message code/src/com/bocom/..../file 1 files changed, 1 insertion(+), 1 deletion(-) 

But in fact,I just modified something in the same line, not deleting or adding any new line.It is strange.

So does anyone know some git command to get the correct modified lines including (added ,deleted,modified) ?

1

2 Answers 2

0

git is indicating that the file has been modified.

git isn't tracking modifications inside of the line level. Instead it's indicating that the original line has been deleted, and a new one has taken it's place.

Sign up to request clarification or add additional context in comments.

Comments

0

Not directly a git command but there is a tool called diffstat which can take git diff's as input and show the number of modified lines.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.