sublimehq / sublime_merge

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

Commits & files panels sometimes don't show uncommited changes #1783

Open Vybo opened 11 months ago

Vybo commented 11 months ago

Version info

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:

  1. Have repo that uses git lfs open
  2. Change a file that is managed by git lfs
  3. 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

SCR-20230725-nmpp SCR-20230725-nmez
dpjohnst commented 11 months ago

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

Vybo commented 11 months ago

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.

Vybo commented 11 months ago

Posting more info about the history not being loaded correctly that I've started encountering more often. This is wrong history:

SCR-20230802-koyf

This is normal history (git history spanning multiple years):

SCR-20230802-kqyp

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

dpjohnst commented 11 months ago

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

Vybo commented 11 months ago

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.