post-recive hook to make updateInstead work in direct mode and adjusted branches

* Added post-recieve hook, which makes updateInstead work with direct
  mode and adjusted branches.
* init: Set up the post-receive hook.

This commit was sponsored by Fernando Jimenez on Patreon.
This commit is contained in:
Joey Hess 2017-02-17 14:04:43 -04:00
parent 4594bece40
commit d074532aff
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
12 changed files with 138 additions and 11 deletions

View file

@ -4,7 +4,7 @@
- not change, otherwise removing old hooks using an old version of
- the script would fail.
-
- Copyright 2013-2014 Joey Hess <id@joeyh.name>
- Copyright 2013-2017 Joey Hess <id@joeyh.name>
-
- Licensed under the GNU GPL version 3 or higher.
-}
@ -22,6 +22,9 @@ import qualified Data.Map as M
preCommitHook :: Git.Hook
preCommitHook = Git.Hook "pre-commit" (mkHookScript "git annex pre-commit .")
postReceiveHook :: Git.Hook
postReceiveHook = Git.Hook "post-receive" (mkHookScript "git annex post-receive")
preCommitAnnexHook :: Git.Hook
preCommitAnnexHook = Git.Hook "pre-commit-annex" ""