sublime_merge
sublime_merge copied to clipboard
Commits & files panels sometimes don't show uncommited changes
Version info
- OS: macOS 13.4.1 (22F82)
- Build: 2083
Description
I wanted to switch a branch, but I get an error with a files list telling me that switching would cause: "error: Your local changes to the following files would be overwritten by checkout: [file list]".
The files were pngs generated by snapshot tests that are tracked byt Git LFS, however the changes are usually visible in Sublime Merge.
Steps to reproduce
Steps to reproduce the behavior:
- Have repo that uses git lfs open
- Change a file that is managed by git lfs
- Try to switch branch while no file changes are visible in Sublime Merge
Expected behavior
I'd expect to see the list of changes.
Debug Information === App Version Information === Build: 2083
=== Git Version Information === Using Git: git (system) git version 2.39.2 (Apple Git-143) PATH: /usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/done/.cargo/bin (from shell) environment variables loaded using: /bin/zsh -l
=== Browse Page Information === HEAD: 626a5c0b5bd2a68e2fd61ce484b5e3c56c83d2fc Is in merge: 0 Is in cherry_pick: 0 Is in rebase: 0 Is in revert: 0
=== Git Status Information === M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error] M [redacted, files corresponding with those shown in error]
=== Our Status Information ===
=== Git Config Information === branch.devel.merge=refs/heads/devel branch.devel.remote=origin branch.fea..[redacted] branch.fea..[redacted] branch.fea..[redacted] branch.fea..[redacted] branch.tas..[redacted] branch.tas..[redacted] branch.tas..[redacted] branch.tas..[redacted] branch.tas..[redacted] branch.tas..[redacted] branch.tas..[redacted] branch.tas..[redacted] branch.tas..[redacted] branch.tas..[redacted] core.bare=false core.filemode=true core.ignorecase=true core.logallrefupdates=true core.precomposeunicode=true core.repositoryformatversion=0 credential.helper=osxkeychain diff.tool=meld difftool.meld.cmd=meld $LOCAL $REMOTE difftool.prompt=false init.defaultbranch=main lfs.repositoryformatversion=0 remote.origin.fetch=+refs/heads/:refs/remotes/origin/ remote.origin.url=git@git[redacted] user.email=d[redacted] user.name=d[redacted]
=== Our Config Information === Git Config Path Information Using config path: /etc/gitconfig Using config path: /Users/d[redacted] Using config path: /Users/d[redacted] Using config path: /Users/d[redacted]
Our config output is different to the Git config output branch.devel.merge=refs/heads/devel branch.devel.remote=origin branch.fe[redacted] branch.fe[redacted] branch.fe[redacted] branch.fe[redacted] branch.ta[redacted] branch.ta[redacted] branch.ta[redacted] branch.ta[redacted] branch.ta[redacted] branch.ta[redacted] branch.ta[redacted] branch.ta[redacted] branch.ta[redacted] branch.ta[redacted] core.bare=false core.filemode=true core.ignorecase=true core.logallrefupdates=true core.precomposeunicode=true core.repositoryformatversion=0 diff.tool=meld difftool.meld.cmd=meld $LOCAL $REMOTE difftool.prompt=false lfs.repositoryformatversion=0 remote.origin.fetch=+refs/heads/:refs/remotes/origin/ remote.origin.url=git@git[redacted] user.email=d[redacted] user.name=d[redacted]
=== Git Attributes Information === git check_attr --all output
=== Our Modified Files Newline Normalisation and EOL Information ===
=== Our Modified Files Flag Information === Ignoring symlinks: 0
Screenshots
Hi @Vybo,
Thanks for reporting this issue - I'll be investigating this further.
Can you confirm if the repository is on a networked file system?
Additionally, could you confirm how many files are present in the repository? (git ls-files | wc -l)
Kind regards, - Dylan from Sublime HQ
Hi @dpjohnst, thank you for looking into it.
The repostiroy is not on a networked file system, it is located in my home directory (~/therepo). It currently contains 9449 files.
Some more remarks: the issue is usually fixed by killing and re-launching Sublime Merge or by just letting it sit for half an hour without touching it or the repository.
I've also encountered an issue where the branch history is not loaded correctly, just a random subset of last ~10 commits, the first visible being incorrectly dated at 1.1.1970. This is also fixed by restarting Sublime Merge and might be a separate, already reported bug.
Posting more info about the history not being loaded correctly that I've started encountering more often.
This is wrong history:
This is normal history (git history spanning multiple years):
Debug info with Sublime Merge being in the broken state: === App Version Information === Build: 2083
=== Git Version Information === Using Git: git (system) git version 2.39.2 (Apple Git-143) PATH: /usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/d.../.cargo/bin (from shell) environment variables loaded using: /bin/zsh -l
=== Browse Page Information === HEAD: 8868ba0ab39c2b14dc85c663475f46b4d0ba656a 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.devel.merge=refs/heads/devel branch.devel.remote=origin branch.feature/M[redacted] branch.feature/M[redacted] core.bare=false core.filemode=true core.ignorecase=true core.logallrefupdates=true core.precomposeunicode=true core.repositoryformatversion=0 credential.helper=osxkeychain diff.tool=meld difftool.meld.cmd=meld $LOCAL $REMOTE difftool.prompt=false init.defaultbranch=main lfs.repositoryformatversion=0 remote.origin.fetch=+refs/heads/:refs/remotes/origin/ remote.origin.url=git@git[redacted] user.email=d[redacted] user.name=d[redacted]
=== Our Config Information === Git Config Path Information Using config path: /etc/gitconfig Using config path: /Users/d.../.config/git/config Using config path: /Users/d.../.gitconfig Using config path: /Users/d.../k.../.git/config
Our config output is different to the Git config output branch.devel.merge=refs/heads/devel branch.devel.remote=origin branch.feature/M[redacted] branch.feature/M[redacted] core.bare=false core.filemode=true core.ignorecase=true core.logallrefupdates=true core.precomposeunicode=true core.repositoryformatversion=0 diff.tool=meld difftool.meld.cmd=meld $LOCAL $REMOTE difftool.prompt=false lfs.repositoryformatversion=0 remote.origin.fetch=+refs/heads/:refs/remotes/origin/ remote.origin.url=git@git[redacted] user.email=d[redacted] user.name=d[redacted]
=== Git Attributes Information === git check_attr --all output
=== Our Modified Files Newline Normalisation and EOL Information ===
=== Our Modified Files Flag Information === Ignoring symlinks: 0
Hi @Vybo,
Thanks for the additional information.
Could you confirm if there are any error messages displayed in the Sublime Merge console when you run into this issue?
The console can be opened by selecting Tools > Show Console in the application menu.
Additionally, if you run into this again could you confirm if there are any modified/staged files in the repository, and if so what type of files they are (text/image/binary)?
Kind regards, - Dylan from Sublime HQ
Hi, I will followup with the Console check when I encounter the issue again.
As for the state after which the issue occured: the wrong history was displayed after I switched to a branch with no modified/staged files, ran the fetch command and then ran the pull -ff command. From what I can tell, all commands were executed properly, just the UI broke. The repository contains mostly swift files and some image files.
As with my original issue, restarting or leaving the app be for a while resolves the issue.
Hello, any updates on this issue, please? The app is still buggy for me, sometimes even showing one last commit that I've just commited, but all history is then shown only as thousands of staged files.
I recently switched codebases and these issues still happen from time to time, so it was not something specific with the previous codebase.
Hi @Vybo,
I apologise for the delay in finding a solution to this issue. I am actively investigating it but have been unable to reproduce the issue thus far.
Can you confirm the following:
- If you're seen any errors in the console when you've encountered this issue
- If this issue occurs for you on any public repositories (this would help greatly in tracking down the issue)
- This issue only occurs on Git LFS repositories
- Which version of Sublime Merge you are using
Kind regards, - Dylan from Sublime HQ
Hi, thanks for looking into it.
Now thinking about it, I might be thinking only about the issue mentioned in this comment. The issue where the history UI breaks and I have to restart Sublime Merge.
I haven't encountered the checkout issue in the new repository without Git LFS, but the UI issue I have encountered.
To add some more points to the UI issue:
I haven't found any errors in the console. It always looks like an issue with the UI only, since the git commands pass okay and even if I leave other GUIs open working with the same repository, they update fine and represent the true status.
I haven't worked in any public repository of similar size for this issue to manifest, however I'll keep this in mind and I'll try playing around some to see if I can reproduce it.
The new repository does not use Git LFS, so the UI issue is probably not related to Git LFS, but the checkout from the initial issue description might.
Always the latest version, currently build 2102. I haven't seen the issue so far on this build, but I encountered it with the previous build and the one that's mentioned in the original issue.
I also noticed few other things, for example the revision numbers look really odd (see screenshot), however
git rev-list --left-right --count main...origin/main
0 57
gives me more sane output. I don't know what command Sublime Merge uses for this though, so I might be comparing two different things.
Fast forwarding local branch to the remote branch works fine.