summaryrefslogtreecommitdiff
path: root/Init.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Init.hs')
-rw-r--r--Init.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/Init.hs b/Init.hs
index fe1b7a441..25b83be49 100644
--- a/Init.hs
+++ b/Init.hs
@@ -32,6 +32,7 @@ import Utility.FileMode
import Config
import Annex.Direct
import Annex.Content.Direct
+import Annex.Environment
import Backend
genDescription :: Maybe String -> Annex String
@@ -53,11 +54,14 @@ initialize mdescription = do
setVersion defaultVersion
checkCrippledFileSystem
checkFifoSupport
- Annex.Branch.create
gitPreCommitHookWrite
createInodeSentinalFile
u <- getUUID
- describeUUID u =<< genDescription mdescription
+ {- This will make the first commit to git, so ensure git is set up
+ - properly to allow commits when running it. -}
+ ensureCommit $ do
+ Annex.Branch.create
+ describeUUID u =<< genDescription mdescription
uninitialize :: Annex ()
uninitialize = do