aboutsummaryrefslogtreecommitdiff
path: root/Command/Commit.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-03-14 12:01:56 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-03-14 12:18:10 -0400
commit5b869eef911d36627174ed5a02452011effc2a14 (patch)
tree69ea97e9db91c2c2d347a691399ff38d09b20465 /Command/Commit.hs
parentb27760aa68d8c4cf1a1b0be3c3a5582539f857b5 (diff)
git-annex-shell: Runs hooks/annex-content after content is received or dropped.
Diffstat (limited to 'Command/Commit.hs')
-rw-r--r--Command/Commit.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Command/Commit.hs b/Command/Commit.hs
index 2bb016ea0..19b0bc250 100644
--- a/Command/Commit.hs
+++ b/Command/Commit.hs
@@ -7,8 +7,10 @@
module Command.Commit where
+import Common.Annex
import Command
import qualified Annex.Branch
+import qualified Git
def :: [Command]
def = [command "commit" paramNothing seek
@@ -20,4 +22,7 @@ seek = [withNothing start]
start :: CommandStart
start = next $ next $ do
Annex.Branch.commit "update"
- return True
+ runhook =<< (inRepo $ Git.hookPath "annex-content")
+ where
+ runhook (Just hook) = liftIO $ boolSystem hook []
+ runhook Nothing = return True