sublimehq / sublime_merge

Issue tracker for Sublime Merge
https://www.sublimemerge.com
276 stars 14 forks source link

Sublime Merge will not show local changes, stuck at Loading changes... infinitely #1157

Closed reyesm24 closed 1 year ago

reyesm24 commented 3 years ago

Version info

Description

The tool will not load the local changes, instead shows Loading changes... and never changes state. I have tried other git clients to see if it's a problem with my repo and they are able to show the local changes just fine, not sure what is going on. I have also tried deleting and re-cloning the repo, this fixes the issue temporarily but will quickly stop working.

Steps to reproduce

Steps to reproduce the behavior:

  1. Open repository and wait for it to show all local changes
  2. Keep waiting...

Expected behavior See local changes after a few seconds

srbs commented 3 years ago

Does SM fix itself (or does it improve things) when you choose the menu item Tools > Refresh?

Do you have similar issues with any other repository?

Also, is the repository you're having issues with publicly accessible (to reproduce)?

reyesm24 commented 3 years ago

No, Tools > Refresh does not appear to change the behavior. I am having issues with two separate repositories. Unfortunately, neither is publicly accessible. I recently noticed that there is a hooks folder that keeps getting created that includes post-checkout, post-commit, post-merge, and pre-push files. I am not sure what tool is creating these (if it is SM or something else) but hadn't noticed these been present until this issue started appearing.

dpjohnst commented 3 years ago

Hi @reyesm24,

Thanks for reaching out - I'll do my best to have this issue resolved for you as quickly as possible.

Firstly, could you try starting Sublime Merge in safe mode and see if this resolves the issue? You can start Sublime Merge in safe mode by holding Shift + Alt as you start Sublime Merge. To confirm you have indeed started into safe mode, a dialog should appear confirming this.

Secondly, would you mind sharing your Sublime Merge debug information? (if possible, it may not work if the application is completely unresponsive) This can be done by opening the repository in Sublime Merge, and navigating to Help > Debug Information. Before sharing this, take a moment to remove any information you feel is sensitive (i.e. email addresses, file paths, remote repository paths etc).

Thanks, - Dylan

debasis123 commented 3 years ago

Is any fix available? I see this in Ubuntu 20.04

dpjohnst commented 3 years ago

Hi @debasis123,

Thanks for reaching out - I'll be looking into this. Would you mind also sharing the above information too?

Thanks, - Dylan

debasis123 commented 3 years ago

Hi @dpjohnst sorry for my slow response. So we switched from bitbucket to gitlab and I did not clone the repo completely new but just changed the credentials. Looked like, it did not work. After I cloned a new repo from gitlab instead, the problem disappeared.

jkhoriaty commented 3 years ago

Hi, I also observed this issue and it is blocking. I think it is linked to git LFS (or maybe the hooks that is installs). My repos are stuck on "Loading changes..." and the application becomes unresponsive and I can't even close any tags or the application itself without killing it through the task manager. This issue was not there in previous versions.

ghost commented 3 years ago

I have the same issue which can either manifest itself as described here, or as in #1212. In case a file tracked by git LFS changes while Sublime Merge is open, I get the behaviour seen in #1212.
If I first change a file which is tracked by git LFS and then (re)open Sublime Merge I get the infinite "Loading changes..." status.

I need to end the sublime_merge.exe process tree (which kills any spawned git-lfs.exe processes as well) then commit the changes in git bash to be able to reopen Sublime Merge.

Context

The LFS file I changed is a 3.5 MB CSV.

While Sublime Merge is hanging I can see these two processes running without using any CPU (until I kill the SM process tree):

My gitignore_global file looks like this:

#ignore thumbnails created by windows
Thumbs.db
venv/
 # IDE folders
.idea/*
.spyproject/*
.vscode/*
# Cache
__pycache__/*

My gitattributes looks like this:

output/** filter=lfs diff=lfs merge=lfs -text
sourcedata/** filter=lfs diff=lfs merge=lfs -text
My repos .gitignore looks like this (fold-out) ```txt # Generated files # ########### *.pdf *.docx *.pkl # Folders # ########### # Matlab # ########## *.asv # Compiled source # ################### *.com *.class *.dll *.exe *.o *.so *.pyc # Packages # ############ # it's better to unpack these files and commit the raw source # git has its own built in compression methods *.7z *.dmg *.gz *.iso *.jar *.rar *.tar *.zip # Logs and databases # ###################### *.log *.sql *.sqlite # OS generated files # ###################### .DS_Store .DS_Store? ._* .Spotlight-V100 .Trashes ehthumbs.db Thumbs.db *.asv # IDE # ####### .idea/* .spyproject ```
This is the debug output of Sublime Merge ```txt === App Version Information === Build: 2059 === Git Version Information === Using Git: C:\Program Files\Git\cmd\git.exe (system) git version 2.33.0.windows.2 PATH: C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\AdoptOpenJDK\jdk-16.0.1.9-hotspot\bin;C:\lib;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\MiKTeX 2.9\miktex\bin\x64\;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files\Matlab\R2020a\runtime\win64;C:\Program Files\Matlab\R2020a\bin;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\dotnet\;%USERPROFILE%\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\tools\BCURRAN3;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Program Files\Git LFS;C:\Users\user\AppData\Local\Microsoft\WindowsApps;C:\Users\user\AppData\Local\Pandoc\;C:\Program Files\Sublime Merge;C:\Program Files\heroku\bin;c:\Users\user\Apps\bin\;C:\Users\user\AppData\Roaming\npm === Browse Page Information === HEAD: f04e9a0a3f0bffa4f0dedb6388fffe33470a6e33 Is in merge: 0 Is in cherry_pick: 0 Is in rebase: 0 Is in revert: 0 === Git Status Information === M output/large_file.csv === Our Status Information === === Git Config Information === branch.sim-outbound.merge=refs/heads/sim-outbound branch.sim-outbound.remote=origin branch.master.merge=refs/heads/master branch.master.remote=origin core.autocrlf=true core.bare=false core.bigfilethreshold=100m core.editor=nano -w core.excludesfile=C:\Users\user\OneDrive - company\Other\gitignore_global.txt 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:/Users/user/AppData/Local/Programs/WinMerge/WinMergeU.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 http.sslbackend=openssl http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt init.defaultbranch=master lfs.repositoryformatversion=0 mergetool.sourcetree.cmd='C:/Users/user/AppData/Local/Programs/WinMerge/WinMergeU.exe' -wl -wm -dl Remote -dm Base -dr Local $REMOTE $BASE $LOCAL -o $MERGED mergetool.sourcetree.trustexitcode=true pack.windowmemory=512m pull.rebase=false remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* remote.origin.url=git@ci.company.nl:model/basis/script.git status.submodulesummary=true user.email=user@company.nl user.name=some_username === 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/user/.config/git/config Using config path: /C/Users/user/.gitconfig Using config path: /C/Users/user/repos/models/script/.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: 1 ```
This is the git status -vvv output from git bash: ```txt $ git status -vvv On branch sim-outbound Your branch is up to date with 'origin/sim-outbound'. Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git restore ..." to discard changes in working directory) modified: output/large_file.csv -------------------------------------------------- Changes not staged for commit: diff --git i/output/large_file.csv w/output/large_file.csv index 04071ce..c2d60fc 100644 --- i/output/large_file.csv +++ w/output/large_file.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dfd9058f03459b97927183eb164f77830625d40406dfd9d71fc3c5a50f5b7546 +oid sha256:bf855a4623312a9eb7afdd1f680862d02816b566c38c54bb62ccadf0b0910df2 size 3736042 no changes added to commit (use "git add" and/or "git commit -a") ```

Hope this helps narrowing down the issue, let me know if I can provide more information.

ghost commented 3 years ago

To add to my previous comment, it appears that the git.exe clean -- output/large_csv.csv command is hung, halting Sublime Merge.

If I run the git clean command separately in git bash, I get:

$ git clean -- input/large_csv.csv
fatal: clean.requireForce defaults to true and neither -i, -n, nor -f given; refusing to clean

The git clean command spawned by Sublime Merge appears to miss an option which it needs.
This stackoverflow post shows that one can either add the -i, -n or -f option or one can adjust the settings in the repository.

As I cannot control what options SM passes on to git, I tried setting clean.requireForce to false with:

git config --local clean.requireForce false 

Unfortunately that did not resolve this issue, but perhaps this helps finding the issue?

ghost commented 3 years ago

After trying out different builds from the dev download page I found that (on Windows) build 2046 is the last build that does not hang on a git LFS repository. In my tests I always set the SM preferences to use system git to rule out any issues with the bundled git version.

From build 2048 onwards every version has the issue as described above.

The changelog of build 2048 states (bolding mine):

BUILD 2048 11 March 2021 Allow command palette navigation with Tab / Shift + Tab Fixed newlines appearing in the commit message history Fixed blame tooltips not updating in certain circumstances Fixed crash when staging files with certain file encodings Windows and Mac: updated bundled Git to 2.30.2 (addresses CVE-2021-21300) Windows: fixed clean and smudge filters hanging on certain files Linux: improved application menu theming

Perhaps the clean and smudge filter fix needs to be revised?

For now I've downgraded to build 2046 as a workaround.

Edit: apparently build 2047 also works, I guess this is a release of the 2046 dev build. Not sure what the difference is between these two builds.

joaoe commented 2 years ago

I have this problem, on Windows 10, build 2071

How to reproduce:

  1. We have a python project with a poetry.lock file
  2. .gitattributes contains poetry.lock filter=my_filter
  3. and a configured filter (which just points to a local pypi cache)
    [filter "my_filter"]
    smudge = sed 's|https://pypi.org|https://internal.repository.local|g'
    clean = sed 's|https://internal.repository.local|https://pypi.org|g'

    Seems Sublime Merge gets stuck with the smudge and clean commands. sed (from the git core utils folder) is in the PATH. Yet sublime merge has trouble running that command apparently. Seeing the comment above about lfs, this looks like something more generic with smudge+clean.

anthony-ozdemir commented 2 years ago

I'm also having this issue. It looks like issue is related to Sublime Merge itself and not the system git binaries.

Unfortunately, I had to switch to GitKraken until this issue gets resolved.

Windows 10 Pro, build 19044.

I also use a security hardened Windows.

AngryAnt commented 2 years ago

Reproduction on latest flathub build here. Issue does indeed seem related to changes to filters as it started showing up in this repository shortly after adding git-lfs configuration.

AngryAnt commented 2 years ago

Update: From where I'm sitting it looks like the core issue is a .gitattributes construct like this:

* filter=lfs diff=lfs merge=lfs
*.[tT][xX][tT] -filter -diff -merge text=auto

Presumably Sublime Merge is not happy about the reset-to-default for filter, diff, and merge properties?

Algoryx-NilsHjelte commented 2 years ago

Same problem here as well.

I also see correlation with usage of LFS, but not sure exactly what is causing the problem.

donaldmcn commented 2 years ago

I just ran into the same issue.

I had an un-committed file (a png) that uses LFS.

I was able to work around it by manually doing a git add from a console window.

Once the file was in the commit list, SM stopped hanging.

haikl commented 2 years ago

I'm seeing the very same issue in my repository. The workaround mentioned by @donaldmcn works but is more than annoying.

Another guess towards a solution: Is SM simply waiting for some expected git clean output that won't be produced? Just as for @ba-tno, running the command git.exe clean -- changed-lfs-file manually in my repo produces the output

fatal: clean.requireForce defaults to true and neither -i, -n, nor -f given; refusing to clean

without git getting stuck. After all, SM doesn't really crash, but some worker thread (the one spawning the git process?) seems to be stuck so that no more updates are delivered to the UI and SM won't exit cleanly since it waits for the blocked thread.

@dpjohnst Please have another look at this issue. I would love to buy SM since I'm very happy with it, but this issue is a major blocker. Thanks!!!

haikl commented 2 years ago

Looking a little closer, SM uses the command git-lfsclean -- changed-lfs-file. Manually running this command it produces the error

Cannot read from STDIN. This command should be run by the Git 'clean' filter

I also attached to the hanging git-lfs process and it sits in WaitForSingleObject(), I guess waiting for input from STDIN. Maybe the fix is to not use git-lfs but simply git when issuing the clean command.

If SM uses something like libgit2, maybe there is an incompatibility to git-lfs on my system? Here are the versions I use:

$>git lfs version
git-lfs/2.13.2 (GitHub; windows amd64; go 1.14.13; git fc664697)

$>git version
git version 2.30.0.windows.2

Thanks again for looking into this issue!

dpjohnst commented 2 years ago

Hi all,

Thanks for the extensive information you've provided so far and for your patience.

We're still actively investigating this issue but so far have been unable to reproduce the issue on our end. If this is occurring on a public repository for anyone, would you mind sharing the link to the repo?

Additionally:

Thanks, - Dylan

AngryAnt commented 2 years ago

Hi all,

Thanks for the extensive information you've provided so far and for your patience.

We're still actively investigating this issue but so far have been unable to reproduce the issue on our end. If this is occurring on a public repository for anyone, would you mind sharing the link to the repo?

Additionally:

* Could anyone running into this issue confirm which version of Sublime Merge you are on.

* If you could share the `.gitattributes` file from the repository you're seeing this issue on that would be appreciated too.

Thanks, - Dylan

Build 2071.

# By default, everything is in LFS and does not get line endings normalized
* filter=lfs diff=lfs merge=lfs

[attr]editedText filter=text diff=text merge=text text=auto
[attr]uneditedText filter=text diff=text merge=text
[attr]lockableUnmergedText filter=text diff=text merge=binary lockable

# Dot files presumed git config files and similar - in either case text
.* editedText

# Actual text files which should get line endings nornalized
*.[tT][xX][tT] editedText
*.[mM][dD] editedText
*.[cC][sS] editedText
*.[sS][hH][aA][dD][eE][rR] editedText
*.[hH][lL][sS][lL] editedText
*.[cC][gG][iI][nN][cC] editedText
*.[xX][mM][lL] editedText
*.[yY][mM][lL] editedText
*.[jJ][sS][oO][nN] editedText
*.[sS][hH] editedText
*.[dD][oO][tT][sS][eE][tT][tT][iI][nN][gG][sS] editedText

# Text formatted Unity assets which should not have line endings messed with
*.[mM][eE][tT][aA] uneditedText
*.[pP][rR][eE][fF][aA][bB] uneditedText
*.[aA][sS][sS][eE][tT] uneditedText
*.[cC][oO][nN][tT][rR][oO][lL][lL][eE][rR] uneditedText
*.[aA][sS][mM][dD][eE][fF] uneditedText
*.[mM][aA][tT] uneditedText
*.[pP][hH][yY][sS][iI][cC][mM][aA][tT][eE][rR][iI][aA][lL] uneditedText
ProjectSettings/*.[cC][oO][nN][fF][iI][gG] uneditedText

# Scenes are stored as text, will not be merged, and can be locked
*.[uU][nN][iI][tT][yY] lockableUnmergedText
haikl commented 2 years ago

@dpjohnst I prepared a test repo: https://github.com/haikl/sublime-merge-1157. It contains steps to reproduce.

I can reproduce the issue every time.

mstudorache commented 2 years ago

Hi @dpjohnst, do you have any news on this issue?

lloydli commented 2 years ago

Hi all,

Thanks for the extensive information you've provided so far and for your patience.

We're still actively investigating this issue but so far have been unable to reproduce the issue on our end. If this is occurring on a public repository for anyone, would you mind sharing the link to the repo?

Additionally:

  • Could anyone running into this issue confirm which version of Sublime Merge you are on.
  • If you could share the .gitattributes file from the repository you're seeing this issue on that would be appreciated too.

Thanks, - Dylan

Hi,what is the new progress on this issue, because I have been encountering the same problem...

EntroPiGames commented 2 years ago

I'm having a similar issue with an LFS repo on Windows 10, but in my case the application freezes entirely.

I can't even resize or move the application window, and have to kill the process from the task manager. Strangely enough, I can still scroll through the tab with the file diff changes.

Reverting to 2047 fixes the issue though.

dpjohnst commented 2 years ago

Hi all,

We're still actively investigating this issue but unfortunately have been unable to reproduce the issue despite extensive testing on multiple Windows machines.

@EntroPiGames

Additionally if anyone can consistently reproduce this issue and would be willing to work with one of the engineers to diagnose this issue on your machine, could you reach out to me (djohnston) via the Sublime discord channel at: https://discord.gg/CVNAhtDE

Many thanks, - Dylan from Sublime HQ

ghost commented 2 years ago

I just installed a Windows 10 Hyper-V virtual machine, installed the following setup:

The I followed the steps from both Option 1 and Option 2.

I could not reproduce this issue! Both options provide the expected result, although it takes a while (almost half a minute) before the change is registered correctly in SM.

I then went into my local machine that has the following setup:

Again I tried both options, but here I could reproduce the issue.

I have attached my redacted debug info below per reproduction option (as numbered in haikl's repository)

Option 1 - create new LFS file

Debug info on VM ``` === App Version Information === Build: 2077 === Git Version Information === Using Git: C:\Program Files\Git\cmd\git.exe (system) git version 2.37.3.windows.1 PATH: 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\Puppet Labs\Puppet\bin;C:\Program Files\Git\cmd;C:\Users\IEUser\AppData\Local\Microsoft\WindowsApps; === Browse Page Information === HEAD: e8a513c2ce9db22ff7481574b1b991a318d6e7e4 Is in merge: 0 Is in cherry_pick: 0 Is in rebase: 0 Is in revert: 0 === Git Status Information === ?? lfs/new.lfs === Our Status Information === ?? lfs/new.lfs === Git Config Information === branch.main.merge=refs/heads/main branch.main.remote=origin core.autocrlf=true core.bare=false core.editor=nano.exe 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 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 init.defaultbranch=main lfs.repositoryformatversion=0 pull.rebase=false remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* remote.origin.url=https://github.com/haikl/sublime-merge-1157.git === 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/IEUser/.config/git/config Using config path: /C/Users/IEUser/.gitconfig Using config path: /C/Users/IEUser/repos/sublime-merge-1157/.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: 1 ```
Debug info on local machine ``` === App Version Information === Build: 2077 === Git Version Information === Using Git: C:\Program Files\Git\cmd\git.exe (system) git version 2.37.3.windows.1 PATH: C:\Program Files\ImageMagick-7.1.0-Q16-HDRI;;C:\Program Files\AdoptOpenJDK\jdk-16.0.1.9-hotspot\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\lib;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\MiKTeX 2.9\miktex\bin\x64\;C:\Program Files\Matlab\R2020a\runtime\win64;C:\Program Files\Matlab\R2020a\bin;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\dotnet\;C:\Users\redacted\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\tools\BCURRAN3;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Git LFS;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files\gs\gs9.56.1\bin;C:\Program Files\PuTTY\;C:\Program Files\PowerShell\7\;C:\tools\gsudo\Current;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\redacted\Miniconda3;C:\Users\redacted\Miniconda3\Library\mingw-w64\bin;C:\Users\redacted\Miniconda3\Library\usr\bin;C:\Users\redacted\Miniconda3\Library\bin;C:\Users\redacted\Miniconda3\Scripts;c:\Program Files\AdoptOpenJDK\jdk-16.0.1.9-hotspot\bin;C:\Users\redacted\AppData\Local\activestate\cache\bin;C:\Users\redacted\AppData\Local\ActiveState\StateTool\release;C:\Users\redacted\AppData\Local\Microsoft\WindowsApps;C:\Users\redacted\AppData\Local\Pandoc\;C:\Program Files\Sublime Merge;C:\Program Files\heroku\bin;c:\Users\redacted\Apps\bin\;C:\Users\redacted\Documents\PowerShell\Scripts;c:\Program Files\Microsoft Office\root\vfs\ProgramFilesX86\Microsoft Office\Office16\DCF\;C:\Users\redacted\AppData\Roaming\npm === Browse Page Information === HEAD: e8a513c2ce9db22ff7481574b1b991a318d6e7e4 Is in merge: 0 Is in cherry_pick: 0 Is in rebase: 0 Is in revert: 0 === Git Status Information === ?? lfs/new.lfs === Our Status Information === ?? lfs/new.lfs === Git Config Information === branch.main.merge=refs/heads/main branch.main.remote=origin core.autocrlf=true core.bare=false core.editor=nano -w core.filemode=false core.fscache=true core.ignorecase=true core.logallrefupdates=true core.repositoryformatversion=0 core.symlinks=false credential.helper=store credential.https://redacted.provider=generic credential.https://dev.azure.com.usehttppath=true credential.https://git.redacted.provider=generic diff.astextplain.textconv=astextplain diff.jupyternotebook.command=git-nbdiffdriver diff diff.tool=winmerge difftool.nbdime.cmd=git-nbdifftool diff "$LOCAL" "$REMOTE" "$BASE" difftool.sourcetree.cmd='C:/Users/redacted/AppData/Local/Programs/WinMerge/WinMergeU.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 http.sslbackend=openssl http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt init.defaultbranch=master lfs.repositoryformatversion=0 merge.jupyternotebook.driver=git-nbmergedriver merge %O %A %B %L %P merge.jupyternotebook.name=jupyter notebook merge driver mergetool.nbdime.cmd=git-nbmergetool merge "$BASE" "$LOCAL" "$REMOTE" "$MERGED" mergetool.prompt=false mergetool.sourcetree.cmd='C:/Users/redacted/AppData/Local/Programs/WinMerge/WinMergeU.exe' -wl -wm -dl Remote -dm Base -dr Local $REMOTE $BASE $LOCAL -o $MERGED mergetool.sourcetree.trustexitcode=true pack.windowmemory=512m pull.rebase=false remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* remote.origin.url=https://github.com/haikl/sublime-merge-1157.git user.email=redacted user.name=ba_tno === 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/Users/redacted/repos/sublime-merge-1157/.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: 1 ```

Option 2 - edit existing LFS file

Debug info on VM ``` === App Version Information === Build: 2077 === Git Version Information === Using Git: C:\Program Files\Git\cmd\git.exe (system) git version 2.37.3.windows.1 PATH: 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\Puppet Labs\Puppet\bin;C:\Program Files\Git\cmd;C:\Users\IEUser\AppData\Local\Microsoft\WindowsApps; === Browse Page Information === HEAD: e8a513c2ce9db22ff7481574b1b991a318d6e7e4 Is in merge: 0 Is in cherry_pick: 0 Is in rebase: 0 Is in revert: 0 === Git Status Information === M lfs/test.lfs === Our Status Information === M lfs/test.lfs === Git Config Information === branch.main.merge=refs/heads/main branch.main.remote=origin core.autocrlf=true core.bare=false core.editor=nano.exe 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 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 init.defaultbranch=main lfs.repositoryformatversion=0 pull.rebase=false remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* remote.origin.url=https://github.com/haikl/sublime-merge-1157.git === 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/IEUser/.config/git/config Using config path: /C/Users/IEUser/.gitconfig Using config path: /C/Users/IEUser/repos/sublime-merge-1157/.git/config Our config output is identical to the Git config output === Git Attributes Information === git check_attr --all output lfs/test.lfs lfs/test.lfs: diff: lfs lfs/test.lfs: merge: lfs lfs/test.lfs: text: unset lfs/test.lfs: filter: lfs === Our Modified Files Newline Normalisation and EOL Information === lfs/test.lfs: disabled - crlf === Our Modified Files Flag Information === Ignoring symlinks: 1 lfs/test.lfs: Working - Normal File : Index - Normal File ```
Debug info on local machine ``` === App Version Information === Build: 2077 === Git Version Information === Using Git: C:\Program Files\Git\cmd\git.exe (system) git version 2.37.3.windows.1 PATH: C:\Program Files\ImageMagick-7.1.0-Q16-HDRI;;C:\Program Files\AdoptOpenJDK\jdk-16.0.1.9-hotspot\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\lib;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\MiKTeX 2.9\miktex\bin\x64\;C:\Program Files\Matlab\R2020a\runtime\win64;C:\Program Files\Matlab\R2020a\bin;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\dotnet\;%USERPROFILE%\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\tools\BCURRAN3;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Git LFS;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files\gs\gs9.56.1\bin;C:\Program Files\PuTTY\;C:\Program Files\PowerShell\7\;C:\tools\gsudo\Current;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\redacted\Miniconda3;C:\Users\redacted\Miniconda3\Library\mingw-w64\bin;C:\Users\redacted\Miniconda3\Library\usr\bin;C:\Users\redacted\Miniconda3\Library\bin;C:\Users\redacted\Miniconda3\Scripts;c:\Program Files\AdoptOpenJDK\jdk-16.0.1.9-hotspot\bin;C:\Users\redacted\AppData\Local\activestate\cache\bin;C:\Users\redacted\AppData\Local\ActiveState\StateTool\release;C:\Users\redacted\AppData\Local\Microsoft\WindowsApps;C:\Users\redacted\AppData\Local\Pandoc\;C:\Program Files\Sublime Merge;C:\Program Files\heroku\bin;c:\Users\redacted\Apps\bin\;C:\Users\redacted\Documents\PowerShell\Scripts;c:\Program Files\Microsoft Office\root\vfs\ProgramFilesX86\Microsoft Office\Office16\DCF\;C:\Users\redacted\AppData\Roaming\npm === Browse Page Information === HEAD: e8a513c2ce9db22ff7481574b1b991a318d6e7e4 Is in merge: 0 Is in cherry_pick: 0 Is in rebase: 0 Is in revert: 0 === Git Status Information === M lfs/test.lfs === Our Status Information === === Git Config Information === branch.main.merge=refs/heads/main branch.main.remote=origin core.autocrlf=true core.bare=false core.editor=nano -w core.filemode=false core.fscache=true core.ignorecase=true core.logallrefupdates=true core.repositoryformatversion=0 core.symlinks=false credential.helper=store credential.https://redacted.provider=generic credential.https://dev.azure.com.usehttppath=true credential.https://git.redacted.es.provider=generic diff.astextplain.textconv=astextplain diff.jupyternotebook.command=git-nbdiffdriver diff diff.tool=winmerge difftool.nbdime.cmd=git-nbdifftool diff "$LOCAL" "$REMOTE" "$BASE" difftool.sourcetree.cmd='C:/Users/redacted/AppData/Local/Programs/WinMerge/WinMergeU.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 http.sslbackend=openssl http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt init.defaultbranch=master lfs.repositoryformatversion=0 merge.jupyternotebook.driver=git-nbmergedriver merge %O %A %B %L %P merge.jupyternotebook.name=jupyter notebook merge driver mergetool.nbdime.cmd=git-nbmergetool merge "$BASE" "$LOCAL" "$REMOTE" "$MERGED" mergetool.prompt=false mergetool.sourcetree.cmd='C:/Users/redacted/AppData/Local/Programs/WinMerge/WinMergeU.exe' -wl -wm -dl Remote -dm Base -dr Local $REMOTE $BASE $LOCAL -o $MERGED mergetool.sourcetree.trustexitcode=true pack.windowmemory=512m pull.rebase=false remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* remote.origin.url=https://github.com/haikl/sublime-merge-1157.git user.email=redacted user.name=ba_tno === 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/Users/redacted/repos/zzz_other/sublime-merge-1157/.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: 1 ```
dpjohnst commented 2 years ago

Hi @ba-tno,

Thanks for sharing! Looking at the different configurations, I can see that the local machine has diff/merge tools configured, but the VM does not. Perhaps this could be contributing to the issue (maybe LFS is waiting for a diff tool), but I have been unable to reproduce the issue on my end.

Would anyone else be able to share their Sublime Merge debug information for the affected repositories?

Thanks, - Dylan from Sublime HQ

ghost commented 2 years ago

I've scrubbed all configuration from my local machine such that it would match the VM (except for the PATH variable), but unfortunately that didn't solve the issue.

Debug info local machine after scrub (Option 1) ``` === App Version Information === Build: 2077 === Git Version Information === Using Git: C:\Program Files\Git\cmd\git.exe (system) git version 2.37.3.windows.1 PATH: C:\Program Files\ImageMagick-7.1.0-Q16-HDRI;C:\Program Files\AdoptOpenJDK\jdk-16.0.1.9-hotspot\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\lib;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\MiKTeX 2.9\miktex\bin\x64\;C:\Program Files\Matlab\R2020a\runtime\win64;C:\Program Files\Matlab\R2020a\bin;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\dotnet\;%USERPROFILE%\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\tools\BCURRAN3;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Git LFS;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files\gs\gs9.56.1\bin;C:\Program Files\PuTTY\;C:\Program Files\PowerShell\7\;C:\tools\gsudo\Current;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\redacted\Miniconda3;C:\Users\redacted\Miniconda3\Library\mingw-w64\bin;C:\Users\redacted\Miniconda3\Library\usr\bin;C:\Users\redacted\Miniconda3\Library\bin;C:\Users\redacted\Miniconda3\Scripts;c:\Program Files\AdoptOpenJDK\jdk-16.0.1.9-hotspot\bin;C:\Users\redacted\AppData\Local\activestate\cache\bin;C:\Users\redacted\AppData\Local\ActiveState\StateTool\release;C:\Users\redacted\AppData\Local\Microsoft\WindowsApps;C:\Users\redacted\AppData\Local\Pandoc\;C:\Program Files\Sublime Merge;C:\Program Files\heroku\bin;c:\Users\redacted\Apps\bin\;C:\Users\redacted\Documents\PowerShell\Scripts;c:\Program Files\Microsoft Office\root\vfs\ProgramFilesX86\Microsoft Office\Office16\DCF\;C:\Users\redacted\AppData\Roaming\npm === Browse Page Information === HEAD: e8a513c2ce9db22ff7481574b1b991a318d6e7e4 Is in merge: 0 Is in cherry_pick: 0 Is in rebase: 0 Is in revert: 0 === Git Status Information === ?? lfs/new.lfs === Our Status Information === ?? lfs/new.lfs === Git Config Information === branch.main.merge=refs/heads/main branch.main.remote=origin core.autocrlf=true core.bare=false core.editor=nano.exe 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 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 init.defaultbranch=main lfs.repositoryformatversion=0 pull.rebase=false remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* remote.origin.url=https://github.com/haikl/sublime-merge-1157.git === 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/Users/redacted/repos/zzz_other/sublime-merge-1157/.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: 1 ```

I've also re-installed SM, this time directly from the website (instead of using chocolatey). Didn't solve it either.

haikl commented 2 years ago

I took the liberty to debug into the stuck git-lfs. It sits in https://github.com/git-lfs/git-lfs/blob/52d47f085ba5ae534dd26ba76d010a537ddbdc8e/lfs/pointer.go#L129, waiting for input from stdin. stdin is supposed to contain/provide the git object to clean (see https://github.com/git-lfs/git-lfs/blob/52d47f085ba5ae534dd26ba76d010a537ddbdc8e/commands/command_clean.go#L103).

The full callstack is this: image

By some reason, on affected computers stdin is ready but won't provide any data.

alexhajdu commented 2 years ago

The issue is still there. macOS 12.6, working with git lfs repo and got stuck on infinitely. Can't quit the app another way than Force quitting it.

image
EntroPiGames commented 1 year ago

@EntroPiGames

* What version of Windows are you on? Is it 64-bit?

* How did you install Sublime Merge?

* Is this a public repository that you're seeing this issue on?

* Do you have a `.gitignore` file in the repository? If so, could you share the contents of it?

* Could you share your `.gitattributes` file for the repository in question?

* Could you also share your Sublime Merge debug information if possible (accessible via the application menu under Help > Debug Information, take a moment to redact any information you feel is sensitive such as git user info, remotes, paths etc)

@dpjohnst Sorry for the late reply, but had some deadlines to meet and just continued using an older build.

I've now updated to 2079 and the repository seems to be working fine again in Sublime Merge, but that might also be due to changes made to the repo itself while using the downgraded version.

To answer your questions:

gitignore.txt gitattributes.txt

haikl commented 1 year ago

I just checked with Build 2079. Sadly, I cannot second @EntroPiGames. On my machine the issue persists with the test repo.

dpjohnst commented 1 year ago

Hi @haikl,

When you have a spare moment, could you try updating to the latest version of Git LFS to confirm if this resolves the issue for you: https://github.com/git-lfs/git-lfs/releases/tag/v3.2.0

Additionally, would you mind sending your Sublime Merge debug information for the affected repository (Accessible via the application menu under Help > Debug Information. Take a moment to redact any information you feel is sensitive such as git user info, remotes, paths etc).

Thanks, - Dylan from Sublime HQ

mstudorache commented 1 year ago

@dpjohnst Hi, I tried a fresh clone of haikl's repo with his instructions from Option 1:

have a clean repo
open Sublime Merge (should show no changes and an empty summary page)
in your favorite editor, create a new file lfs/new.lfs, put some text in it, and save it
go to Sublime Merge, and go to the Untracked Files section

and it gets stuck just like written in the repo description by @haikl . Trying to see the content of new.lfs in the Untracked section results in ... forever.

I have SM (stable channel, Build 2079) use the system binaries for git, with git-lfs on version 3.2.0 and git at 2.38.1.windows.1:

>git-lfs --version
git-lfs/3.2.0 (GitHub; windows amd64; go 1.18.2)

>git --version
git version 2.38.1.windows.1

Here's the debug information after SM get's stuck when viewing the content of new.lfs (I replaced my username with ** in it)

=== App Version Information ===
Build: 2079

=== Git Version Information ===
Using Git: C:\Program Files\Git\cmd\git.exe (system)
git version 2.38.1.windows.1
PATH: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Perforce\;C:\Program Files\dotnet\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Program Files\Git LFS;C:\Users\******\AppData\Local\Microsoft\WindowsApps;C:\Users\******\.dotnet\tools;C:\Users\******\AppData\Local\GitHubDesktop\bin;C:\Program Files\Sublime Merge;

=== Browse Page Information ===
HEAD: e8a513c2ce9db22ff7481574b1b991a318d6e7e4
Is in merge: 0
Is in cherry_pick: 0
Is in rebase: 0
Is in revert: 0

=== Git Status Information ===
?? lfs/new.lfs

=== Our Status Information ===
?? lfs/new.lfs

=== Git Config Information ===
branch.main.merge=refs/heads/main
branch.main.remote=origin
core.autocrlf=true
core.bare=false
core.excludesfile=C:\Users\******\Documents\gitignore_global.txt
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/Perforce/p4merge.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
http.sslbackend=openssl
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
init.defaultbranch=master
lfs.repositoryformatversion=0
mergetool.sourcetree.cmd='C:/Program Files/Perforce/p4merge.exe' "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
mergetool.sourcetree.trustexitcode=true
pull.rebase=false
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=https://github.com/haikl/sublime-merge-1157.git
user.email=********
user.name=*******

=== 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/******/.config/git/config
Using config path: /C/Users/******/.gitconfig
Using config path: /C/test_repo/.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: 1
dpjohnst commented 1 year ago

Hi all,

I finally have some good news to share - we've identified the cause of the issue and are working on a fix.

Unfortunately the fix won't be ready for the next build, but we are hoping to have it ready in a subsequent build. Thank you for your patience while this was investigated, and stay tuned.

Kind regards, - Dylan from Sublime HQ

dpjohnst commented 1 year ago

Hi all,

A quick update - we've just released Sublime Merge 2081 (development build) which aims to address this issue. When you have a spare moment, could you confirm whether the issue is resolved on your end in Sublime Merge build 2081?

We've also got a few more fixes on the way which should address stability here, and I'll keep you updated when these get released.

Kind regards, - Dylan from Sublime HQ

joaoe commented 1 year ago

When you have a spare moment, could you confirm whether the issue is resolved on your end in Sublime Merge build 2081?

Excellent. I just tried it and it seems to work :) Thank you.

mstudorache commented 1 year ago

I can also confirm this works now. Thanks!

danielbizercox commented 1 year ago

I have also run into this issue several times and build 2081 resolves it for me. Thank you!

haikl commented 1 year ago

It took me some time to spot the dev build download section. The new version solves the problem. I already successfully pushed a change to the test repo using Sublime Merge. Thanks!!!

dpjohnst commented 1 year ago

Fixed in Sublime Merge 2083 (stable) :tada:

thgh commented 1 year ago

Hi, I'm having a similar issue with "Loading changes..." in a non-LFS repo since upgrading to v2083.

Did revert to v2079 and cannot reproduce the issue anymore.

alexhajdu commented 1 year ago

Thanks, I’m still having issues, unfortunately. I had to switch to Fork in the meantime as on Mac and LFS Sublime merge is not a way to go.

On 24 Feb 2023, at 10:11 AM, Thomas Ghysels @.***> wrote:

Hi, I'm having a similar issue with "Loading changes..." in a non-LFS repo since upgrading to v2083.

Did revert to v2079 and cannot reproduce the issue anymore.

— Reply to this email directly, view it on GitHub https://github.com/sublimehq/sublime_merge/issues/1157#issuecomment-1443263075, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN5QHB4IWWJA56BDPKL4FDWZB3LRANCNFSM45U2Z2AA. You are receiving this because you commented.

ethan-stryker commented 9 months ago

Having this issue on lfs-enabled repo with:

WORKAROUND: