Use --rebase instead of --no-edit in gitPull

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
This commit is contained in:
2026-05-13 21:48:49 -04:00
parent 65bf75cdf2
commit 4bc23b5d7c
4 changed files with 12 additions and 14 deletions
+1 -1
View File
@@ -305,7 +305,7 @@ gitPull :: RepoConfig -> IO (ExitCode, Text, Text)
gitPull repo =
runGitIn
(rcPath repo)
["pull", "--no-edit", T.unpack (rcRemote repo), T.unpack (rcBranch repo)]
["pull", "--rebase", T.unpack (rcRemote repo), T.unpack (rcBranch repo)]
-- | Check if the repository currently has merge conflicts.
hasConflicts :: FilePath -> IO Bool