From a3c9d06a265b2d6d3003af805b8345e4ddd3d87c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 25 Feb 2012 16:31:38 -0400 Subject: add git-annex-shell commit Eventually, git-annex might try running this after making changes to a remote. I have not yet thought of a good way for it to tell which remotes it needs to run it on though. It can't just do it when shutting down a cached ssh connection, because ssh connection caching is optional, and that would not handle local remotes not accessed over ssh either. --- Command/Commit.hs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Command/Commit.hs (limited to 'Command') 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 + - + - 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 -- cgit v1.2.3