Sublime Forum

Mini-diff shows entire file changed (3188, dev channel)

#1

Hello,

in my project, with a “clean” git status (no changed files), some files are shown as “completely modified” (light colored bar on the gutter, for the entire file). This behavior seems changed since the install of latest dev version (3188)

0 Likes

#2

What line endings does your file use? Does you git repo have autocrlf set to true?

0 Likes

#3

Hi Will,

the file has Windows line endings, and the option autocflf is false:

> git config core.autocrlf false

0 Likes

#4

What file encoding are these files using? You can show the file encoding in the status bar with the show_encoding setting.

Also, what’s the value if your “enable_hexadecimal_encoding” setting? You can see this for the files in question by opening them and running view.settings().get("enable_hexadecimal_encoding") in the console

0 Likes

#5

The file is UTF-8. The setting is True.

>>> view.settings().get("enable_hexadecimal_encoding") True

I fond out this: in the same project, I have files with UTF-8 encoding, with Unix line endings, that are not showing the issue.

0 Likes

#6

I am experiencing the same problem. Any file that I open shows the entire file has been changed. Even if I re-save the file after I open it, my external git does not detect any changes nor does the sublime tree git notifications indicators.

0 Likes

#7

May be these files which are showing to be 100% modified have a EOL (End Of Line) change from CRLF to LF or from LF to CRLF. Or they have mixed CRLF and LF line endings, which are discarded by Sublime Text internal engine.

0 Likes

#8

I double checked the file: it contains as many CRLF as the count of rows (therefore, a CRLF per row)

0 Likes

#9
1 Like