Sublime Forum

Line ending issue when selecting system git

#1

I am trying the portable version of sublime merger on windows 10
When I select the bundled git, there is no issue
When I select the system git, SM show all lines different, as if it is not respecting the system config
core.autocrlf=true

All the other GIT GUIs on my machine, have no issue
Also one nice thing about SourceTree is that when you select the system git, the options section shows you the path for GIT which gives you confidence its using the correct git

So either SM cant find my system git, or for somereason unable to read te system .gitconfig
I am not really sure whats happening
How can i find more information about the system git and gitconfigs read and detected by sublime merge

Update:
I tried the 3rd option selecting the git.exe, and it seems fine now
I dont know what happens when I select system, because SM can read the log
and see the changed files etc…
So it doesnt really make sense that it didnt find the system git

0 Likes

#2

presumably Help menu -> Debug Information tells you the location of your system Git, at least the PATH environment variable that Sublime Merge sees, so you can always open a new terminal, set the path and do a which git to see which SM uses

0 Likes

#3

Thanks this was very helpful
Where I changed my Git Binary preference to System,
SM set the Git Binary to

=== Git Version Information ===
Using Git: C:\Program Files\Git\cmd\git.exe (system)

But I have my Git in the Users folder

=== Git Version Information ===
Using Git: C:\Users\USERNAME\AppData\Local\Programs\Git\cmd\git.exe (custom)

I think SM should look for Git in my Path
Get-Command git

And not in a predetermined path
Anyway, since I am not planning to reinstall git under Program Files, I will leave the custom Git Binary preference, it doesn’t seem to make a difference, and it prevent SM from ignoring
core.autocrlf=true

Going back to the first issue I noticed, the line ending issue
Looking at the debug info, one would expect that SM would still do the correct thing
since under autocrlf was true

=== Our Config Information ===
..
core.autocrlf=true
..

But it was not, it was treating all CRs as new characters

0 Likes