summaryrefslogtreecommitdiff
path: root/Command/Commit.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command/Commit.hs')
-rw-r--r--Command/Commit.hs23
1 files changed, 23 insertions, 0 deletions
diff --git a/Command/Commit.hs b/Command/Commit.hs
new file mode 100644
index 000000000..2bb016ea0
--- /dev/null
+++ b/Command/Commit.hs
@@ -0,0 +1,23 @@
+{- git-annex command
+ -
+ - Copyright 2012 Joey Hess <joey@kitenet.net>
+ -
+ - Licensed under the GNU GPL version 3 or higher.
+ -}
+
+module Command.Commit where
+
+import Command
+import qualified Annex.Branch
+
+def :: [Command]
+def = [command "commit" paramNothing seek
+ "commits any staged changes to the git-annex branch"]
+
+seek :: [CommandSeek]
+seek = [withNothing start]
+
+start :: CommandStart
+start = next $ next $ do
+ Annex.Branch.commit "update"
+ return True