summaryrefslogtreecommitdiff
path: root/Init.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Init.hs')
-rw-r--r--Init.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/Init.hs b/Init.hs
index 4fbeabe01..3f4a9d385 100644
--- a/Init.hs
+++ b/Init.hs
@@ -76,10 +76,11 @@ gitPreCommitHookWrite = unlessBare $ do
hook <- preCommitHook
ifM (liftIO $ doesFileExist hook)
( warning $ "pre-commit hook (" ++ hook ++ ") already exists, not configuring"
- , liftIO $ do
- viaTmp writeFile hook preCommitScript
- p <- getPermissions hook
- setPermissions hook $ p {executable = True}
+ , unlessM crippledFileSystem $
+ liftIO $ do
+ viaTmp writeFile hook preCommitScript
+ p <- getPermissions hook
+ setPermissions hook $ p {executable = True}
)
gitPreCommitHookUnWrite :: Annex ()