From 80302d0b46c5d45df1cf290796e0e27d9264ece8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 22 Jun 2011 18:32:41 -0400 Subject: improve bare repo handing Many more commands can work in bare repos now, thanks to the git-annex branch. --- Command/Init.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Command/Init.hs') diff --git a/Command/Init.hs b/Command/Init.hs index df416eed3..7f5773117 100644 --- a/Command/Init.hs +++ b/Command/Init.hs @@ -8,7 +8,7 @@ module Command.Init where import Control.Monad.State (liftIO) -import Control.Monad (when) +import Control.Monad (when, unless) import System.Directory import Command @@ -44,7 +44,8 @@ perform description = do u <- getUUID g setVersion describeUUID u description - gitPreCommitHookWrite g + unless (Git.repoIsLocalBare g) $ + gitPreCommitHookWrite g next $ return True {- set up a git pre-commit hook, if one is not already present -} -- cgit v1.2.3