Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

file showing in modified filter but diff window says unmodified

Phil Bergner December 19, 2013

I downloaded a github repo, created a project in eclipse, pushed the project contents to a server via a metadata API, did some work etc. Its possible that the metadata API process might have modified my files in some way because now in Sourcetree I'm seeing all of my repo files in the 'Show Modified' filter list. When I click on any of them that I didn't manually change the diff window says 'unmodified file'. Any idea what would cause this or how to filter these out?

1 answer

1 accepted

1 vote
Answer accepted
Aseem Parikh
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 19, 2013

Permission changes and whitespace changes (newlines in particular) count as modifications, but diffing will show no difference for either of these situations.

Take a look at this documentation on workarounds for whitespace changes: http://git-scm.com/book/ch7-1.html#Formatting-and-Whitespace

Phil Bergner December 19, 2013

Wouldn't whitespace changes show up with the Ignore Whitespace box unchecked?

Aseem Parikh
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 19, 2013

Theoretically, yes. I'm still convinced that it's a line ending problem considering the symptoms of the problem. Sourcetree is probably just inherting its behavior from your git config.

Do you see the same thing on the command line if you run 'git status'? If so, what do you see when you run 'git diff <modified_file>'?

What OS are you working on? Are you working with a team that uses other OSes?

Phil Bergner December 19, 2013

when i run git status it shows them all as modified

If I do a git diff for a specific file I see : 'warning: LF will be replaced with CRLF ... the file will have its original line endings in your working directory'

Aseem Parikh
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 19, 2013

If you run 'git config --global core.autocrlf false', the warnings should go away.

Phil Bergner December 19, 2013

thanks that seems to have done it

Aseem Parikh
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 19, 2013

Always happy to help!

Vasily Rassokhin March 4, 2015

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events