diff options
author | Joey Hess <joey@kitenet.net> | 2011-06-22 18:32:41 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-06-22 18:32:41 -0400 |
commit | 80302d0b46c5d45df1cf290796e0e27d9264ece8 (patch) | |
tree | c97312a531f5cf2ef514ddb5224395b614eb2b25 /Command/Init.hs | |
parent | 944c51ba26efc39416c5f148b6ec36151dc7f42e (diff) |
improve bare repo handing
Many more commands can work in bare repos now, thanks to the git-annex
branch.
Diffstat (limited to 'Command/Init.hs')
-rw-r--r-- | Command/Init.hs | 5 |
1 files changed, 3 insertions, 2 deletions
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 -} |