summaryrefslogtreecommitdiff
path: root/Version.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-08-17 14:14:43 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-08-17 14:44:31 -0400
commit56f6923ccbc6fb1932137b53458a4cece47e69b0 (patch)
treea2c9a949f2c6c5163551a76f4012e7606e3c1463 /Version.hs
parent3b5f7221305ba6e768711d8326a01b78fb1e4f79 (diff)
Now "git annex init" only has to be run once
when a git repository is first being created. Clones will automatically notice that git-annex is in use and automatically perform a basic initalization. It's still recommended to run "git annex init" in any clones, to describe them.
Diffstat (limited to 'Version.hs')
-rw-r--r--Version.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Version.hs b/Version.hs
index 7e6910fbe..44fd2e9de 100644
--- a/Version.hs
+++ b/Version.hs
@@ -39,10 +39,10 @@ getVersion = do
setVersion :: Annex ()
setVersion = setConfig versionField defaultVersion
-checkVersion :: Annex ()
-checkVersion = getVersion >>= handle
+checkVersion :: Annex () -> Annex ()
+checkVersion initaction = getVersion >>= handle
where
- handle Nothing = error "First run: git-annex init"
+ handle Nothing = initaction
handle (Just v) = unless (v `elem` supportedVersions) $
error $ "Repository version " ++ v ++
" is not supported. " ++