-
Notifications
You must be signed in to change notification settings - Fork 67
Description
G'day! Could you help me understand what's behind this compatibility problem?
Sublime Merge often loses track after stgit commands, ending up something like this:
The current branch will be off to the side, as if it not the current branch, and the dotted line at the left will trail off as if you'd checked out a detached HEAD from an unrelated repo with a single commit. In the example above, it didn't even show the current branch, which I'd created with stg branch --create. Full repro below.
Commands to confuse it:
# command # confuses Sublime Merge?
stg pop -1 # yes
stg pop && stg push # no
stg pop --all && stg push --all # yes
stg pop --all # noI've recently found I can restore Sublime Merge's to the view I'd expect, for a while:
Commands to restore it:
git gc --no-prune
git maintenance runThis'll surely be more to do with their use of git than yours, but Sublime Merge has a thousand issues. It strikes me it's more likely someone familiar with Git internals will trip over my post here.
What's going on? What's the quickest command I could run in a zsh hook to identify and repair the problem?
Commands used to take the screenshots above:
brew install git stgit
brew install --cask sublime-merge
git init
smerge .
echo "Demonstrate a confused Sublime Merge." > README.md
git add README.md
git commit -m "Declare intent."
stg branch --create work
vim README.md. # make some changes
stg new log-some-commands -m "Log some commands." -r README.md
# observe Sublime Merge is confused
git maintenance run
# observe Sublime Merge is no longer confusedVersions:
I've had the problem for at least a year, so any recent versions will do, but I'm currently running:
- macOS 15.3.1 (24D70)
- stgit 2.5.3, built per stgit.rb
- git 2.48.1, built per git.rb
- Sublime Merge build 2102, installed per sublime-merge.rb
Configuration:
Sublime Merge's debug information shows a small selection of git's config, so these might prove relevant:
core.bare=false
core.filemode=true
core.fsmonitor=true
core.ignorecase=true
core.logallrefupdates=true
core.precomposeunicode=true
core.repositoryformatversion=0
maintenance.auto=false
maintenance.repo=/Users/my/git/repo
maintenance.strategy=incremental
Perhaps also relevant:
index.version=2