aboutsummaryrefslogtreecommitdiff
path: root/Annex
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-10-05 16:23:09 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-10-05 16:23:09 -0400
commitaa38d92afcc0efbe7bb9786d00c45f71af756b75 (patch)
tree8d41e4a52905d1a6141e2761aeaa5b93ffd36d71 /Annex
parent1497590d45d8f7bebc8b308e7196e493c0489f60 (diff)
When auto-upgrading a v3 remote, avoid upgrading to version 6, instead keep it at version 5.
Fixes a bug introduced with v6 mode that I didn't notice until now. Probably not many v3 repos left out there, and upgrading them to v6 mode is not disastrous, only a little premature. This commit was sponsored by Riku Voipio
Diffstat (limited to 'Annex')
-rw-r--r--Annex/Init.hs3
-rw-r--r--Annex/Version.hs3
2 files changed, 5 insertions, 1 deletions
diff --git a/Annex/Init.hs b/Annex/Init.hs
index ead638990..9e0361daf 100644
--- a/Annex/Init.hs
+++ b/Annex/Init.hs
@@ -93,7 +93,8 @@ initialize' mversion = do
Database.Keys.scanAssociatedFiles
v <- checkAdjustedClone
case v of
- NeedUpgradeForAdjustedClone -> void $ upgrade True
+ NeedUpgradeForAdjustedClone ->
+ void $ upgrade True versionForAdjustedClone
InAdjustedClone -> return ()
NotInAdjustedClone ->
ifM (crippledFileSystem <&&> (not <$> isBareRepo))
diff --git a/Annex/Version.hs b/Annex/Version.hs
index af9487871..7726840de 100644
--- a/Annex/Version.hs
+++ b/Annex/Version.hs
@@ -24,6 +24,9 @@ latestVersion = "6"
supportedVersions :: [Version]
supportedVersions = ["5", "6"]
+versionForAdjustedClone :: Version
+versionForAdjustedClone = "6"
+
upgradableVersions :: [Version]
#ifndef mingw32_HOST_OS
upgradableVersions = ["0", "1", "2", "3", "4", "5"]