summaryrefslogtreecommitdiff
path: root/Init.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Init.hs')
-rw-r--r--Init.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/Init.hs b/Init.hs
index 8c79002bc..8cec98c5f 100644
--- a/Init.hs
+++ b/Init.hs
@@ -19,13 +19,14 @@ import Logs.UUID
import Annex.Version
import Annex.UUID
-initialize :: Annex ()
-initialize = do
+initialize :: Maybe String -> Annex ()
+initialize mdescription = do
prepUUID
Annex.Branch.create
setVersion
gitPreCommitHookWrite
- getUUID >>= recordUUID
+ u <- getUUID
+ maybe (recordUUID u) (describeUUID u) mdescription
uninitialize :: Annex ()
uninitialize = gitPreCommitHookUnWrite
@@ -40,7 +41,7 @@ ensureInitialized = getVersion >>= maybe needsinit checkVersion
needsinit = do
annexed <- Annex.Branch.hasSomeBranch
if annexed
- then initialize
+ then initialize Nothing
else error "First run: git-annex init"
{- set up a git pre-commit hook, if one is not already present -}