sync: When in an adjusted branch, merge changes from the original branch

This causes changes to the original branch to get merged with a single
sync. Before, it took 2 syncs; the first happened to update the synced/
branch, and the second merged changes from the synced/ branch into the
ajusted branch.

Using mergeToAdjustedBranch when tomerge == origbranch is probably
overkill, but it does work fine.

Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
This commit is contained in:
Joey Hess 2023-07-06 12:42:00 -04:00
parent 51b24aac91
commit 240bae38f6
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
6 changed files with 72 additions and 49 deletions

View file

@ -62,7 +62,7 @@ mergeBranch o r = starting "merge" ai si $ do
currbranch <- getCurrentBranch
mc <- mergeConfig (allowUnrelatedHistories o)
let so = def { notOnlyAnnexOption = True }
next $ merge currbranch mc so Git.Branch.ManualCommit r
next $ merge currbranch mc so Git.Branch.ManualCommit [r]
where
ai = ActionItemOther (Just (UnquotedString (Git.fromRef r)))
si = SeekInput []