summaryrefslogtreecommitdiff
path: root/Annex/Init.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-02-17 14:04:43 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-02-17 14:04:43 -0400
commit615053c624b357520ef01db60c58e60d848a44bd (patch)
tree90bcd7299da5767ddab3eaabb335c55b9a13a9be /Annex/Init.hs
parent5b64144c2fb989f9799c1ec328b442b504b1d10f (diff)
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.
Diffstat (limited to 'Annex/Init.hs')
-rw-r--r--Annex/Init.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Annex/Init.hs b/Annex/Init.hs
index 74274ad7f..3427c0049 100644
--- a/Annex/Init.hs
+++ b/Annex/Init.hs
@@ -83,8 +83,9 @@ initialize' mversion = do
checkLockSupport
checkFifoSupport
checkCrippledFileSystem
- unlessM isBareRepo $
+ unlessM isBareRepo $ do
hookWrite preCommitHook
+ hookWrite postReceiveHook
setDifferences
unlessM (isJust <$> getVersion) $
setVersion (fromMaybe defaultVersion mversion)
@@ -114,6 +115,7 @@ initialize' mversion = do
uninitialize :: Annex ()
uninitialize = do
hookUnWrite preCommitHook
+ hookUnWrite postReceiveHook
removeRepoUUID
removeVersion