honor init --version=5 on crippled filesystem

init: When --version=5 is passed on a crippled filesystem, use a v5 direct
mode repo as requested, rather than upgrading to v7 adjusted unlocked.

Fixed test suite on crippled filesystems, making it request --version=5
to test direct mode.
This commit is contained in:
Joey Hess 2018-12-19 13:07:19 -04:00
parent 14971414dc
commit 5759e93444
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 15 additions and 13 deletions

View file

@ -17,7 +17,6 @@ import Types.Test
import qualified Annex
import qualified Annex.UUID
import qualified Annex.Version
import qualified Types.RepoVersion
import qualified Backend
import qualified Git.CurrentRepo
@ -214,9 +213,7 @@ clonerepo old new cfg = do
configrepo new
indir new $ do
ver <- annexVersion <$> getTestMode
if ver == Annex.Version.defaultVersion
then git_annex "init" ["-q", new] @? "git annex init failed"
else git_annex "init" ["-q", new, "--version", show (Types.RepoVersion.fromRepoVersion ver)] @? "git annex init failed"
git_annex "init" ["-q", new, "--version", show (Types.RepoVersion.fromRepoVersion ver)] @? "git annex init failed"
unless (bareClone cfg) $
indir new $
setupTestMode