diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-03-03 14:17:37 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-03-03 14:20:39 -0400 |
commit | 7a2d72b7c7eb8d6879b4f3a94b2d14df0bf86d67 (patch) | |
tree | e7e93c0288e59aa345d3be9095807ec7caa06f63 /Annex/AdjustedBranch.hs | |
parent | 923d0f546c4e041b22b1c1e23e53c27dc4d5f932 (diff) |
can't checkout adjusted branch while index is still locked
There's a race here, but entering an adjusted branch for the first time is
not something to do when a commit is being made at the same time. Although,
may want to prevent the assistant from committing while entering the
adjusted branch.
Diffstat (limited to 'Annex/AdjustedBranch.hs')
-rw-r--r-- | Annex/AdjustedBranch.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Annex/AdjustedBranch.hs b/Annex/AdjustedBranch.hs index cea138f55..5762c6b30 100644 --- a/Annex/AdjustedBranch.hs +++ b/Annex/AdjustedBranch.hs @@ -91,8 +91,8 @@ originalBranch = fmap fromAdjustedBranch <$> inRepo Git.Branch.current enterAdjustedBranch :: Adjustment -> Annex () enterAdjustedBranch adj = go =<< originalBranch where - go (Just origbranch) = preventCommits $ do - adjbranch <- adjustBranch adj origbranch + go (Just origbranch) = do + adjbranch <- preventCommits $ adjustBranch adj origbranch inRepo $ Git.Command.run [ Param "checkout" , Param $ fromRef $ Git.Ref.base $ adjbranch |