summaryrefslogtreecommitdiff
path: root/Init.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-06-10 13:18:18 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-06-10 13:18:18 -0400
commit8b0b5a13228ce4d4b829c8ba14de8360394c1c1c (patch)
tree94300a5108927010b071f413472a12bcf0b3c8d4 /Init.hs
parenta5cb4a7bc5d7d603fc8f5f8b1a1595e889fb25ce (diff)
avoid setting annex.direct in bare repo (no behavior change, just less ugly)
Diffstat (limited to 'Init.hs')
-rw-r--r--Init.hs19
1 files changed, 10 insertions, 9 deletions
diff --git a/Init.hs b/Init.hs
index 09e80eebd..fe1b7a441 100644
--- a/Init.hs
+++ b/Init.hs
@@ -160,15 +160,16 @@ checkCrippledFileSystem = whenM probeCrippledFileSystem $ do
setConfig (ConfigKey "core.symlinks")
(Git.Config.boolConfig False)
- unlessM isDirect $ do
- warning "Enabling direct mode."
- top <- fromRepo Git.repoPath
- (l, clean) <- inRepo $ Git.LsFiles.inRepo [top]
- forM_ l $ \f ->
- maybe noop (`toDirect` f) =<< isAnnexLink f
- void $ liftIO clean
- setDirect True
- setVersion directModeVersion
+ unlessBare $ do
+ unlessM isDirect $ do
+ warning "Enabling direct mode."
+ top <- fromRepo Git.repoPath
+ (l, clean) <- inRepo $ Git.LsFiles.inRepo [top]
+ forM_ l $ \f ->
+ maybe noop (`toDirect` f) =<< isAnnexLink f
+ void $ liftIO clean
+ setDirect True
+ setVersion directModeVersion
probeFifoSupport :: Annex Bool
probeFifoSupport = do