2

I'm using Eclipse + EGit, and every time I make a commit, Egit detect tab chars as changed:

enter image description here

but I don't change anything on that part of the code. Tab chars are tab chars, and are not replaced by whitespaces.

Any idea ?

4
  • 1
    It looks more likely that the newline characters have changed. Use "Show Whitespace Characters" from the context menu to see them. Commented Jul 29, 2013 at 22:17
  • @robinst but it only happens on tab chars. Other lines without tab chars don't show as changed. Commented Jul 30, 2013 at 7:49
  • So, have you tried "Show Whitespace Characters"? Commented Jul 30, 2013 at 10:38
  • possible duplicate of The is nothing changed, but eclipse egit keep to marked the file as changed Commented Oct 22, 2013 at 21:43

1 Answer 1

0

You may have some auto formatter active, which replaces tabs by blanks or the other way around. This may not really be visible in the editor on first glance, as the editor can display a tab character the same as the respective number of blanks. You may want to store the original file and the edited one separately outside Eclipse to compare them in another editor.

However, you can ignore whitespace changes in the compare view at least. I'm not sure of your version, for me that is a toolbar button in the main toolbar. You can press Ctrl-3 and enter "Ignore" to see, if that command is available for you.

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

1 Comment

To ignore whitespace from comparison, you can set the value in Window > Preferences > General > Compare/Patch > Ignore white space

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.