aboutsummaryrefslogtreecommitdiff
path: root/Command/Merge.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-06-22 18:46:45 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-06-22 18:46:56 -0400
commitad3770e0b203b32a07fa142d6d83c980b23310ee (patch)
treed07022b5d9b7628701a737e3d3042680e2998770 /Command/Merge.hs
parent80302d0b46c5d45df1cf290796e0e27d9264ece8 (diff)
add merge subcommand
Diffstat (limited to 'Command/Merge.hs')
-rw-r--r--Command/Merge.hs29
1 files changed, 29 insertions, 0 deletions
diff --git a/Command/Merge.hs b/Command/Merge.hs
new file mode 100644
index 000000000..04328e8c5
--- /dev/null
+++ b/Command/Merge.hs
@@ -0,0 +1,29 @@
+{- git-annex command
+ -
+ - Copyright 2011 Joey Hess <joey@kitenet.net>
+ -
+ - Licensed under the GNU GPL version 3 or higher.
+ -}
+
+module Command.Merge where
+
+import Command
+import qualified Branch
+import Messages
+
+command :: [Command]
+command = [repoCommand "merge" paramNothing seek
+ "auto-merges remote changes into the git-annex branch"]
+
+seek :: [CommandSeek]
+seek = [withNothing start]
+
+start :: CommandStartNothing
+start = do
+ showStart "merge" "."
+ next perform
+
+perform :: CommandPerform
+perform = do
+ Branch.update
+ next $ return True