forgot to compile last commit; fix mistakes

This commit is contained in:
Joey Hess 2017-02-15 13:55:06 -04:00
parent 9fe402187e
commit 2af5f727a9
No known key found for this signature in database
GPG key ID: C910D9222512E3C7

View file

@ -272,17 +272,16 @@ commitStaged commitmode commitmessage = do
return True return True
mergeLocal :: [Git.Merge.MergeConfig] -> CurrBranch -> CommandStart mergeLocal :: [Git.Merge.MergeConfig] -> CurrBranch -> CommandStart
mergeLocal mergeconfig currbranch@(Just branch, madj) = mergeLocal mergeconfig currbranch@(Just _, _) =
go =<< needMerge currbranch go =<< needMerge currbranch
where where
go Nothing = stop go Nothing = stop
go (Just syncbranch) = do go (Just syncbranch) = do
showStart "merge" $ Git.Ref.describe syncbranch showStart "merge" $ Git.Ref.describe syncbranch
next $ next $ merge currbranch mergeconfig Git.Branch.ManualCommit syncbranch next $ next $ merge currbranch mergeconfig Git.Branch.ManualCommit syncbranch
syncbranch = syncBranch branch
mergeLocal _ (Nothing, madj) = do mergeLocal _ (Nothing, madj) = do
b <- inRepo Git.Branch.currentUnsafe b <- inRepo Git.Branch.currentUnsafe
ifM (needMerge (b, madj)) ifM (isJust <$> needMerge (b, madj))
( do ( do
warning $ "There are no commits yet in the currently checked out branch, so cannot merge any remote changes into it." warning $ "There are no commits yet in the currently checked out branch, so cannot merge any remote changes into it."
next $ next $ return False next $ next $ return False
@ -292,7 +291,7 @@ mergeLocal _ (Nothing, madj) = do
-- Returns the branch that should be merged, if any. -- Returns the branch that should be merged, if any.
needMerge :: CurrBranch -> Annex (Maybe Git.Branch) needMerge :: CurrBranch -> Annex (Maybe Git.Branch)
needMerge (Nothing, _) = return Nothing needMerge (Nothing, _) = return Nothing
needMerge (Just branch, madj) = ifM (allM checks) needMerge (Just branch, madj) = ifM (allM id checks)
( return (Just syncbranch) ( return (Just syncbranch)
, return Nothing , return Nothing
) )