git-annex/Command/Merge.hs

32 lines
629 B
Haskell
Raw Normal View History

2011-06-22 18:46:45 -04:00
{- git-annex command
-
- Copyright 2011 Joey Hess <joey@kitenet.net>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Command.Merge where
2011-10-05 16:02:51 -04:00
import Common.Annex
2011-06-22 18:46:45 -04:00
import Command
2011-10-04 00:40:47 -04:00
import qualified Annex.Branch
2011-06-22 18:46:45 -04:00
def :: [Command]
def = [command "merge" paramNothing seek
2011-09-14 13:32:46 -04:00
"auto-merge remote changes into git-annex branch"]
2011-06-22 18:46:45 -04:00
seek :: [CommandSeek]
seek = [withNothing start]
start :: CommandStart
2011-06-22 18:46:45 -04:00
start = do
showStart "merge" "."
next perform
perform :: CommandPerform
perform = do
2011-10-04 00:40:47 -04:00
Annex.Branch.update
-- commit explicitly, in case no remote branches were merged
Annex.Branch.commit "update"
2011-06-22 18:46:45 -04:00
next $ return True