- New LogLevel type: Debug, Info, Warn, Error with Ord instance
- Logger holds configured level and output handle (stderr or file)
- --log-level and --log-file CLI flags
- log_level and log_file YAML config fields
- Log messages assigned appropriate severity levels
- Test logger updated to new Logger structure
- All 17 tests passing
- 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.
- Add loggedGit helper that logs 'RUN: git -C <path> <args>' before
execution and 'EXIT <code>' after (with stderr on failure)
- Refactor gitCommitAll, gitPull, and gitPush to use loggedGit
- Add Logger parameter to gitPull and gitPush
- Update test call sites and syncRepo to pass Logger
- 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
- Remove nonexistent confDebounce field from WatchConfig (fsnotify 0.4.4.0)
- Remove unused Generic deriving and GHC.Generics import
- Replace .!= with fromMaybe (not re-exported by Data.Yaml)
- Add missing Data.Text import in Main.hs
- Use git -C flag in runGitIn to run in the correct repo directory
- Clean up unused imports