sublime_merge
sublime_merge copied to clipboard
<0x0d> at end of every line in summary view on system git
Version info
- OS: Windows 10
- Build: 2032
Description
When switching to system git, files have <0x0d>
at the end of every line in summary view.
Steps to reproduce
Steps to reproduce the behavior:
- Switch to system git
- Modify a file
- View file in summary view
Expected behavior Diff looks normal
Screenshots
Hi @mnordine,
This is likely caused by a difference between the bundled Git configuration and your system Git configuration. From the screenshot, it looks like the line endings in the file have been converted to windows-style line endings.
Could you confirm that core.autocrlf
is enabled for your system Git?
To confirm, perform the following from the command line:
- Navigate to the Git repository via the command line
- Run
git config core.autocrlf
If there is no output, core.autocrlf
is disabled.
In this case, you'll likely want to enable core.autocrlf
for your system Git: git config core.autocrlf true
I would definitely encourage you to read about how core.autocrlf
works - see: https://docs.github.com/en/github/using-git/configuring-git-to-handle-line-endings
If you have any more questions feel free to reply, otherwise you can close this issue if you feel the problem has been resolved.
Kind regards, - Dylan
It's enabled.
Hi @mnordine,
Thanks for the response - would you mind sharing your debug information?
This can be found in Help > Debug Information
After it's copied, take a moment to remove any information you feel is sensitive (paths / configuration values etc)
Additionally, could you confirm whether the screenshotted file is staged?
Thanks, - Dylan
Debug info:
=== App Version Information ===
Build: 2032
=== Git Version Information ===
Using Git: C:\Program Files\Sublime Merge\Git\cmd\git.exe (bundled)
git version 2.26.2.windows.1
PATH: C:\Program Files\Git\cmd;C:\Program Files\Git LFS;C:\Program Files\PuTTY\
=== Browse Page Information ===
HEAD: 306ef97e821782dbf35b50f3a88222562c62e8b7
Is in merge: 0
Is in cherry_pick: 0
Is in rebase: 0
Is in revert: 0
=== Git Status Information ===
M config
m main/pkg/core
M main/web/assets/blah.ogg
?? main/lib/src/utils/scheduling.dart
?? main/web/workers/
=== Our Status Information ===
M config
?? main/lib/src/utils/scheduling.dart
?? main/web/workers/worker.dart
=== Git Config Information ===
color.branch=auto
color.diff=auto
color.interactive=true
color.status=auto
core.autocrlf=true
core.bare=false
core.filemode=false
core.fscache=true
core.ignorecase=true
core.logallrefupdates=true
core.repositoryformatversion=0
core.symlinks=false
credential.helper=manager
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
filter.lfs.smudge=git-lfs smudge -- %f
help.format=html
http.sslbackend=openssl
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
include.path=C:/Program Files/Git/etc/gitconfig
lfs.https://our.server.com/path/repo.git/info/lfs.access=basic
pack.packsizelimit=2g
protocol.version=2
pull.rebase=false
rebase.autosquash=true
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=https://our.server.com/path/repo.git
submodule.config.active=true
submodule.config.url=https://our.server.com/path/config.git
submodule.main/pkg/core.active=true
submodule.main/pkg/core.url=https://our.server.com/path/core.git
[email protected]
user.name=My Name
winupdater.recentlyseenversion=2.25.0.windows.1
=== Our Config Information ===
Git Config Path Information
Using config path: /C/ProgramData/Git/config
Using config path: /C/Program Files/Sublime Merge/Git/etc/gitconfig
Using config path: /C/Users/Me/.config/git/config
Using config path: /C/Users/Me/.gitconfig
Using config path: /C/Users/Me/my_path/repo-name/.git/config
Our config output is identical to the Git config output
=== Git Attributes Information ===
git check_attr --all output
config
config: text: auto
=== Our Modified Files Newline Normalisation and EOL Information ===
config: autocrlf - crlf
=== Our Modified Files Flag Information ===
Ignoring symlinks: 1
config: Working - Gitlink : Index - Gitlink
could you confirm whether the screenshotted file is staged?
It was not staged
Hi @mnordine,
Thanks for your patience while I investigate this issue - so far I've had no luck replicating the issue. Would you mind switching your Git to system via preferences, and then share the debug information?
Thanks, - Dylan
=== App Version Information ===
Build: 2032
=== Git Version Information ===
Using Git: C:\Program Files\Git\cmd\git.exe (system)
git version 2.28.0.windows.1
PATH: C:\Program Files\Git\cmd;C:\Program Files\Git LFS;C:\Program Files\PuTTY\
=== Browse Page Information ===
HEAD: db624fee10d25405e9091ccc78edb0cdb03b0965
Is in merge: 0
Is in cherry_pick: 0
Is in rebase: 0
Is in revert: 0
=== Git Status Information ===
M config
=== Our Status Information ===
M config
=== Git Config Information ===
core.autocrlf=true
core.bare=false
core.filemode=false
core.fscache=true
core.ignorecase=true
core.logallrefupdates=true
core.repositoryformatversion=0
core.symlinks=false
credential.helper=manager
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
filter.lfs.smudge=git-lfs smudge -- %f
http.sslbackend=openssl
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
lfs.https://our.server.com/team/another-project.git/info/lfs.access=basic
protocol.version=2
pull.rebase=false
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=https://our.server.com/team/another-project.git
submodule.config.active=true
submodule.config.url=https://our.server.com/team/config.git
[email protected]
user.name=me
winupdater.recentlyseenversion=2.25.0.windows.1
=== Our Config Information ===
Git Config Path Information
Using config path: /C/ProgramData/Git/config
Using config path: /C/Program Files/Git/mingw64/etc/gitconfig
Using config path: /C/Users/me/.config/git/config
Using config path: /C/Users/me/.gitconfig
Using config path: /C/Users/me/company/another-project/.git/config
Our config output is different to the Git config output
core.bare=false
core.filemode=false
core.ignorecase=true
core.logallrefupdates=true
core.repositoryformatversion=0
core.symlinks=false
credential.helper=manager
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
filter.lfs.smudge=git-lfs smudge -- %f
lfs.https://our.server.com/team/another-project.git/info/lfs.access=basic
protocol.version=2
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=https://our.server.com/team/another-project.git
submodule.config.active=true
submodule.config.url=https://our.server.com/team/config.git
[email protected]
user.name=me
winupdater.recentlyseenversion=2.25.0.windows.1
=== Git Attributes Information ===
git check_attr --all output
.vscode/settings.json
app/.vscode/settings.json
=== Our Modified Files Newline Normalisation and EOL Information ===
config: unspecified - native
=== Our Modified Files Flag Information ===
Ignoring symlinks: 1
config: Working - Gitlink : Index - Gitlink
Not seeing this with Build 2038
so far.
Hi @mnordine,
Thanks for your patience while we investigated this.
This was fixed by a recent change to our Git Config resolution on Windows. I'm going ahead and closing this issue, but if the issue reappears please feel free to re-open the issue.
Kind regards, - Dylan
Looks like this kinda returned with Build 2091 (23 August 2023). I updated to it and now diffs for many files show <0x0d>
symbols. I'm not entirely sure what's the rule for when it's shown and when it's not, as same file extension across different repo behaves differently (e.g. .md
file in one repo shows them, in other doesn't), file encoding maybe?
Is there perhaps a setting in Sublime Merge now to control this behaviour? As nothing changed in my system except upgrading Sublime Merge from 2083 to 2091.
- Sublime Merge is configured to use "system" git
- I already had
git config core.autocrlf
set totrue
- I did not have
git config --global core.autocrlf
set, but after setting it totrue
nothing changed.
Additional issue with this, is that if you try to copy text from such diff and paste it into any text editor you will get double newlines everywhere. You get the standard newline and <0x0d>
must be replaced with another when copying into clipboard.
Hi @holc-tkomp,
Thanks for reporting this - can you please share your Sublime Merge Debug Information for the repository you’re seeing this issue with.
It can be accessed via the application menu under Help > Debug Information. Before sharing this, please redact any information you feel may be sensitive such as file paths, remote URLs etc.
Thanks, - Dylan from Sublime HQ
Sublime Merge Debug Information
=== App Version Information ===
Build: 2091
=== Git Version Information ===
Using Git: C:\Program Files\Git\cmd\git.exe (system)
git version 2.31.1.windows.1
PATH: C:\Program Files\Eclipse Foundation\jdk-8.0.302.8-hotspot\bin;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\Python39\Scripts\;C:\Python39\;C:\Program Files\Common Files\Microsoft Shared\Microsoft Online Services;C:\Program Files (x86)\Common Files\Microsoft Shared\Microsoft Online Services;C:\Program Files\Python37\Scripts\;C:\Program Files\Python37\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\WinMerge;C:\Program Files\Azure Data Studio\bin;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\FCIV\;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Java\jdk1.8.0_211\bin;C:\Oracle\instantclient_19_10\;C:\Program Files\nodejs\;C:\Program Files\WindowsPowerShell\Scripts;C:\Program Files\Spawn;C:\Program Files\Git\cmd;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\HashiCorp\Vagrant\bin;C:\Program Files\Oracle\VirtualBox;C:\StrawberryPerl\c\bin;C:\StrawberryPerl\perl\site\bin;C:\StrawberryPerl\perl\bin;C:\Program Files\PowerShell\7\;C:\Program Files (x86)\dotnet\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\160\DTS\Binn\;C:\Users\XXXX\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\ComponentOne Studio.NET 2.0\bin\;C:\Program Files\kdiff3;C:\Users\XXXX\.dotnet\tools;C:\Users\XXXX\.dotnet\tools;C:\Program Files\Azure Data Studio\bin;C:\Users\XXXX\AppData\Roaming\npm;C:\Users\XXXX\AppData\Local\Microsoft\WindowsApps;;C:\Users\XXXX\Documents\PowerShell\Scripts
=== Browse Page Information ===
HEAD: bffe67b5e14537197a21bcd0defa7e59f5e48304
Is in merge: 0
Is in cherry_pick: 0
Is in rebase: 0
Is in revert: 0
=== Git Status Information ===
?? actual-licenses.csv
=== Our Status Information ===
?? actual-licenses.csv
=== Git Config Information ===
branch.main.merge=refs/heads/main
branch.main.remote=origin
commit.gpgsign=true
core.autocrlf=true
core.bare=false
core.editor=notepad
core.filemode=false
core.fscache=true
core.ignorecase=true
core.logallrefupdates=true
core.repositoryformatversion=0
core.symlinks=false
credential.helper=manager-core
credential.https://dev.azure.com.usehttppath=true
diff.astextplain.textconv=astextplain
difftool.sourcetree.cmd='C:/Program Files/KDiff3/kdiff3.exe' "$LOCAL" "$REMOTE"
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
filter.lfs.smudge=git-lfs smudge -- %f
gpg.program=c:\program files\git\usr\bin\gpg.exe
http.sslbackend=openssl
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
init.defaultbranch=main
mergetool.sourcetree.cmd='C:/Program Files/KDiff3/kdiff3.exe' "$BASE" "$LOCAL" "$REMOTE" -o "$MERGED"
mergetool.sourcetree.trustexitcode=true
pull.rebase=false
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=XXXX
user.email=XXXX@XXXX
user.name=XXXX
user.signingkey=XXXX
=== Our Config Information ===
Git Config Path Information
Using config path: /C/ProgramData/Git/config
Using config path: /C/Program Files/Git/mingw64/etc/gitconfig
Using config path: /C/Users/XXXX/.config/git/config
Using config path: /C/Users/XXXX/.gitconfig
Using config path: /C/XXXX/.git/config
Our config output is different to the Git config output
branch.main.merge=refs/heads/main
branch.main.remote=origin
color.branch=auto
color.diff=auto
color.interactive=true
color.status=auto
commit.gpgsign=true
core.autocrlf=true
core.bare=false
core.editor=notepad
core.filemode=false
core.fscache=true
core.ignorecase=true
core.logallrefupdates=true
core.repositoryformatversion=0
core.symlinks=false
credential.helper=manager
diff.astextplain.textconv=astextplain
difftool.sourcetree.cmd='C:/Program Files/KDiff3/kdiff3.exe' "$LOCAL" "$REMOTE"
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.process=git-lfs filter-process --skip
filter.lfs.required=true
filter.lfs.smudge=git-lfs smudge --skip -- %f
gpg.program=c:\program files\git\usr\bin\gpg.exe
help.format=html
http.sslbackend=openssl
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
mergetool.sourcetree.cmd='C:/Program Files/KDiff3/kdiff3.exe' "$BASE" "$LOCAL" "$REMOTE" -o "$MERGED"
mergetool.sourcetree.trustexitcode=true
rebase.autosquash=true
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=XXXX
user.email=XXXX@XXXX
user.name=XXXX
user.signingkey=XXXX
=== Git Attributes Information ===
git check_attr --all output
=== Our Modified Files Newline Normalisation and EOL Information ===
=== Our Modified Files Flag Information ===
Ignoring symlinks: 1
I have the same problem
Sublime Merge debug information:
=== App Version Information === Build: 2091=== Git Version Information === Using Git: C:\Program Files\Git\bin\git.exe (custom) git version 2.38.1.windows.1 PATH: redacted
=== Browse Page Information === HEAD: 7dcd291b309edd11da2caa849a2aa1dbdca601ef Is in merge: 0 Is in cherry_pick: 0 Is in rebase: 0 Is in revert: 0
=== Git Status Information ===
=== Our Status Information ===
=== Git Config Information === branch.master.merge=refs/heads/master branch.master.remote=origin core.autocrlf=false core.bare=false core.filemode=false core.fscache=true core.ignorecase=true core.logallrefupdates=true core.repositoryformatversion=0 core.symlinks=true credential.redacted diff.astextplain.textconv=astextplain filter.lfs.clean=git-lfs clean -- %f filter.lfs.process=git-lfs filter-process filter.lfs.required=true filter.lfs.smudge=git-lfs smudge -- %f http.sslbackend=redacted http.sslcainfo=redacted include.path=../.gitconfig init.defaultbranch=master lfs.redacted.access=basic lfs.repositoryformatversion=0 pull.rebase=false remote.origin.fetch=+refs/heads/:refs/remotes/origin/ remote.origin.url=redacted
=== Our Config Information === Git Config Path Information Using config path: /C/ProgramData/Git/config Using config path: /C/Program Files/Git/etc/gitconfig Using config path: /C/Users/redacted/.config/git/config Using config path: /C/Users/redacted/.gitconfig Using config path: /C/dev/redacted/.git/config
Our config output is identical to the Git config output
=== Git Attributes Information === git check_attr --all output
=== Our Modified Files Newline Normalisation and EOL Information ===
=== Our Modified Files Flag Information === Ignoring symlinks: 0
I can't find any way to hide them; neither of the two whitespace options in Preferences affects them.
I'll be rolling back to a previous build in the meantime.
Hi all,
This change was an intended change based on feedback that users were missing CRLFs accidentally being introduced into their repositories, as we were hiding them in cases where Git shows them. By default, Git will render carriage returns in diffs unless autocrlf is enabled, or the text/eol attribute has been set on a file.
There is currently a bug with the gitattributes processing, where Sublime Merge is not enabling end-of-line normalization when the eol attribute is set and the text attribute is not. We’re addressing this currently, and this will be resolved in the next build.
For the moment, you can either disable the carriage return rendering with:
- the git config option
git config core.whitespace cr-at-eol
(which will disable carriage return rendering in all diffs) - Enabling the text attribute on the applicable file
- Enabling autocrlf
@holc-tkomp - from your debug information, I can see you already have autocrlf enabled, but you're still seeing carriage returns rendered in the diff. Could you check which attributes are set for the file in question by running git check-attr -a /path/to/file
(replacing /path/to/file
with the path to the file).
@howeaj From your debug information, I can see you have autocrlf disabled. Please see the above three options for hiding the carriage return highlighting and let me know if this solves it for you.
Kind regards, - Dylan from Sublime HQ
I wouldn't mind seeing <0x0d>
in Sublime Merge if it were the same as it is in git diff
, i.e. only for changed parts:
However, Sublime Merge has now started to show it everywhere, even when it hasn't changed:
Which makes the appearance look messy and hard to read.
Have to roll back to 2083 (changing git config core.whitespace
or enabling autocrlf
is unfortunately not an option for me).
@dpjohnst Can you re-open this issue? None of your proposed solutions work for my setup.
I'm in a shared environment with many legacy codebases to maintain, so I can't be changing the global git config or configuring gitattributes for all the codebases. I just need an option to not see my diffs littered with <0x0d>
on every single line.
Also, in the meantime, where can I download the previous build?
@voltaek I agree, kind of in the same boat.
Also, in the meantime, where can I download the previous build?
One way I know is to modify the build number in the download URL. For example (2083 is the very previous stable build): https://download.sublimetext.com/sublime_merge_build_2083_x64_setup.exe If you're on another platform, you may need to explore this on your own by investigating the network tab in your browser's DevTools when you click "Download" on the official download page.
G'day all,
Thanks for sharing your feedback - we've got some changes on the way that will address this issue.
In the meantime you can download Sublime Merge build 2083 (the previous stable build) at: https://download.sublimetext.com/sublime_merge_build_2083_x64_setup.exe
If you'd like to temporarily disable update checks until the fixes are available, you can perform the following steps (licensed users only):
- Open Sublime Merge
- Preferences > Edit Settings...
- Add the following line within the braces:
“update_check”: false
- Save the file
I will update you again once the fixes are available.
Cheers, - Dylan from Sublime HQ
Additionally, apart from it being a bit annoying that it's visible. Copy-pasting from the selected text add extra line endings when pasting elsewhere. So you get this:
info->m_nBotPlayers,
info->m_nMaxPlayers,
serverVersion,
instead of:
info->m_nBotPlayers,
info->m_nMaxPlayers,
serverVersion,
@dpjohnst Any chance of posting the downgrade link for mac as well please?
@dpjohnst Any chance of posting the downgrade link for mac as well please?
Generally you may simply change the version number in the URL, so most probably: https://download.sublimetext.com/sublime_merge_build_2083_mac.zip
This is still broken and I too have reverted to the 2083 build to avoid this annoyance. It can't be that hard to fix an issue that was previously working prior to the successor to the 2083 build. Please address this simple issue in the next release. Thanks!
What he said, it's still broken and annoying. I'm hoping I just missed some settings somewhere that's available in the latest version.
Dev build 2092 has a new setting:
"visible_carriage_returns_at_eol": false
This works well, however it didn't seem to be active by default on macOS, as stated it should be in the changelog. I had to explicitly add the line above to settings.
That did not work for me @jeremytm. I updated the settings, updated the app, and restarted... line endings came right back. :(
It's gone for me in the latest dev build. I hope it gets promoted soon, I'd rather be on a stable version.
Looks like this issue is finally re-fixed in the latest release 2096; the visible_carriage_returns_at_eol
option is disabled by default, and so the default behaviour is that the EOL is only visible if they have actually changed, i.e. the original behaviour prior to v2091. Thanks :)