git-annex-shell: Runs hooks/annex-content after content is received or dropped.
This commit is contained in:
parent
59e2feeda1
commit
caf97fcffd
4 changed files with 28 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue