From 952537166e81299541e89299fe0be3e29b0f3bc3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 10 Jun 2013 13:18:18 -0400 Subject: [PATCH] avoid setting annex.direct in bare repo (no behavior change, just less ugly) --- Init.hs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Init.hs b/Init.hs index 09e80eebde..fe1b7a441a 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