summaryrefslogtreecommitdiff
path: root/Annex/Version.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-12-04 16:29:27 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-12-04 16:33:09 -0400
commit6e7468e9e142b379e0323d59f33c334b59c922fa (patch)
tree94f38e94c254bbc5165a6cbcf4d344d5e61a69af /Annex/Version.hs
parent9a765b7bd8ca28e3f94d9d7a11ce4d7162f700f1 (diff)
don't let git-annex direct be run in a v6 repo
Diffstat (limited to 'Annex/Version.hs')
-rw-r--r--Annex/Version.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Annex/Version.hs b/Annex/Version.hs
index e1983fc67..f9b24d9c4 100644
--- a/Annex/Version.hs
+++ b/Annex/Version.hs
@@ -37,6 +37,12 @@ versionField = annexConfig "version"
getVersion :: Annex (Maybe Version)
getVersion = annexVersion <$> Annex.getGitConfig
+versionSupportsDirectMode :: Annex Bool
+versionSupportsDirectMode = go <$> getVersion
+ where
+ go (Just "6") = False
+ go _ = True
+
setVersion :: Version -> Annex ()
setVersion = setConfig versionField