avoid redundant adjusted branch update in sync
sync still does update it if the config would otherwise not, since it already did.
This commit is contained in:
parent
805af01562
commit
631c8d3e5b
2 changed files with 22 additions and 16 deletions
|
@ -407,17 +407,17 @@ updateBranches (Nothing, _) = noop
|
|||
updateBranches (Just branch, madj) = do
|
||||
-- When in an adjusted branch, propigate any changes made to it
|
||||
-- back to the original branch. The adjusted branch may also need
|
||||
-- to be updated, if the adjustment is not stable.
|
||||
-- to be updated, if the adjustment is not stable, and the usual
|
||||
-- configuration does not update it.
|
||||
case madj of
|
||||
Nothing -> noop
|
||||
Just adj -> do
|
||||
let origbranch = branch
|
||||
propigateAdjustedCommits origbranch adj
|
||||
unless (adjustmentIsStable adj) $ do
|
||||
showSideAction "updating adjusted branch"
|
||||
let adjbranch = originalToAdjusted origbranch adj
|
||||
unlessM (updateAdjustedBranch adj adjbranch origbranch) $
|
||||
warning $ unwords [ "Updating adjusted branch failed." ]
|
||||
unless (adjustmentIsStable adj) $
|
||||
annexAdjustedBranchRefresh <$> Annex.getGitConfig >>= \case
|
||||
0 -> adjustedBranchRefreshFull adj origbranch
|
||||
_ -> return ()
|
||||
|
||||
-- Update the sync branch to match the new state of the branch
|
||||
inRepo $ updateBranch (syncBranch branch) branch
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue