Intellij 'touch'ed files in directory on auto format even though there is no change in some files.

Answered

I ran auto format on all files in my project root directory. When I ran git status, I see some of the files as modified with empty diff. I'm assuming it cannot be a line endings or encoding issue because I checked in the files previously into git from same machine. If someone else changed the encoding or line ending of the file, it should show up in diff even without auto-formatting. What could have intellij done to these files ?

I also see that some of the files I recently worked on from intellij don't show up as modified.

I'm not able to use auto format on all files at a time because of this issue. I don't want to push hundreds of files with empty diff into remote GIT and get shouted by teammates.

2 comments
Comment actions Permalink

Are you sure the checksum of the file is still the same before and after reformat? Maybe your git diff doesn't show differences in white spaces?

0
Comment actions Permalink

Oh my god. You are so correct. Thank you! I was using SourceTree. I enabled show whitespaces.

0

Please sign in to leave a comment.