diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-03-03 16:19:09 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-03-03 16:19:09 -0400 |
commit | ce7e52101cda2715bc4ca0a758884d67fb40669e (patch) | |
tree | 50bc8d47e2c218783b555a896ddfd68b580fce10 /Command | |
parent | 3d9a971e66e3485da1da7895c4003f044bee65fd (diff) |
working toward adjusted commit propigation
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Sync.hs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/Command/Sync.hs b/Command/Sync.hs index 355f71d1d..e6a8373ce 100644 --- a/Command/Sync.hs +++ b/Command/Sync.hs @@ -267,21 +267,20 @@ pushLocal b = do updateSyncBranch :: CurrBranch -> Annex () updateSyncBranch (Nothing, _) = noop -updateSyncBranch (Just branch, _) = do +updateSyncBranch (Just branch, madj) = do -- When in an adjusted branch, propigate any changes to it back to -- the original branch. - branch' <- case adjustedToOriginal branch of - Just (adj, origbranch) -> do - propigateAdjustedCommits origbranch adj - return origbranch - Nothing -> return branch + case madj of + Just adj -> propigateAdjustedCommits branch + (adj, originalToAdjusted branch adj) + Nothing -> return () -- Update the sync branch to match the new state of the branch - inRepo $ updateBranch (syncBranch branch') branch' + inRepo $ updateBranch (syncBranch branch) branch -- In direct mode, we're operating on some special direct mode -- branch, rather than the intended branch, so update the intended -- branch. whenM isDirect $ - inRepo $ updateBranch (fromDirectBranch branch') branch' + inRepo $ updateBranch (fromDirectBranch branch) branch updateBranch :: Git.Branch -> Git.Branch -> Git.Repo -> IO () updateBranch syncbranch updateto g = |