summaryrefslogtreecommitdiff
path: root/Init.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-07-05 12:24:28 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-07-05 12:24:28 -0400
commitfdd1a7beea7fca2e7ec253a943e414555af85dca (patch)
treeec9abf8f2f82cd75839ce51d03bba45f86518065 /Init.hs
parent3a069e678f7eaff6bef9ca983ec81e955f606d66 (diff)
detect system with no dot in FQDN, where git commit will fail, and workaround
Sigh, git is so *fragile*. Or rather, across the set of systems that use git-annex, where are no many horribly broken systems..
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