make sync aware of adjusted branches

So, it will pull and push the original branch, not the adjusted one.

And, for merging, it will use updateAdjustedBranch (not implemented yet).

Note that remaining uses of Git.Branch.current need to be checked too;
for things that should act on the original branch, and not the adjusted
branch.
This commit is contained in:
Joey Hess 2016-02-29 15:23:08 -04:00
parent 9e1ebc2336
commit 7c20bf6e7a
Failed to extract signature
8 changed files with 81 additions and 61 deletions

View file

@ -20,7 +20,7 @@ import qualified Annex
import qualified Git
import qualified Git.Config
import qualified Git.Command
import qualified Git.Branch
import qualified Command.Sync
import Config.Files
import Utility.FreeDesktop
import Utility.DiskFree
@ -202,7 +202,7 @@ postNewRepositoryR = page "Add another repository" (Just Configuration) $ do
- immediately pulling from it. Also spawns a sync to push to it as well. -}
immediateSyncRemote :: Remote -> Assistant ()
immediateSyncRemote r = do
currentbranch <- liftAnnex (inRepo Git.Branch.current)
currentbranch <- liftAnnex $ join Command.Sync.getCurrBranch
void $ manualPull currentbranch [r]
syncRemote r