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 80e101d37..991f7d31c 100644
--- a/Init.hs
+++ b/Init.hs
@@ -35,6 +35,7 @@ import Utility.UserInfo
import Utility.FileMode
#endif
import Annex.Hook
+import Upgrade
genDescription :: Maybe String -> Annex String
genDescription (Just d) = return d
@@ -74,9 +75,12 @@ uninitialize = do
{- Will automatically initialize if there is already a git-annex
- branch from somewhere. Otherwise, require a manual init
- to avoid git-annex accidentially being run in git
- - repos that did not intend to use it. -}
+ - repos that did not intend to use it.
+ -
+ - Checks repository version and handles upgrades too.
+ -}
ensureInitialized :: Annex ()
-ensureInitialized = getVersion >>= maybe needsinit checkVersion
+ensureInitialized = getVersion >>= maybe needsinit checkUpgrade
where
needsinit = ifM Annex.Branch.hasSibling
( initialize Nothing