- gitCommitAll: abort commit when staging (git add -A) fails, e.g.
due to a stale .git/index.lock. Previously the failure was ignored
and commit proceeded on an empty or partial index.
- gitPull: remove explicit branch argument from git pull --rebase.
Passing both remote and branch can conflict with the branch's
configured tracking ref, causing 'Cannot rebase onto multiple
branches'. Now uses just --rebase <remote>, letting git resolve
the tracking branch from config.
- Test: index.lock scenario verifies commit is aborted on staging
failure.
- watchRepo: call syncRepo at startup to commit any pre-existing
uncommitted changes before entering the file watcher
- Add gitPush function for git push <remote> <branch>
- Add push step to syncRepo after successful pull (with failure
notification via notifyUser)
- Export syncRepo and gitPush for testing
- Test: startup sync commits and pushes uncommitted changes
git pull --no-edit fails with exit 128 on divergent branches because
fast-forward is impossible. Using --rebase handles divergent histories
by rebasing local commits on top of fetched remote commits, producing
a linear history without merge commits.
- src/Converge.hs: Change gitPull from --no-edit to --rebase
- test/GitPullSpec.hs: Update rebase test to expect success and
verify linear history (3 commits, no merge parents)
- test/*.hs: Clean up unused imports