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:
parent
14971414dc
commit
5759e93444
4 changed files with 15 additions and 13 deletions
|
@ -109,7 +109,10 @@ initialize' ai mversion = checkCanInitialize ai $ do
|
|||
hookWrite postReceiveHook
|
||||
setDifferences
|
||||
unlessM (isJust <$> getVersion) $
|
||||
setVersion (fromMaybe defaultVersion mversion)
|
||||
ifM (crippledFileSystem <&&> (not <$> isBareRepo))
|
||||
( setVersion (fromMaybe versionForCrippledFilesystem mversion)
|
||||
, setVersion (fromMaybe defaultVersion mversion)
|
||||
)
|
||||
whenM versionSupportsUnlockedPointers $ do
|
||||
configureSmudgeFilter
|
||||
scanUnlockedFiles
|
||||
|
@ -286,11 +289,12 @@ propigateSecureHashesOnly =
|
|||
=<< getGlobalConfig "annex.securehashesonly"
|
||||
|
||||
adjustToCrippledFilesystem :: Annex ()
|
||||
adjustToCrippledFilesystem = ifM (liftIO $ AdjustedBranch.isGitVersionSupported)
|
||||
( do
|
||||
void $ upgrade True versionForCrippledFilesystem
|
||||
AdjustedBranch.adjustToCrippledFileSystem
|
||||
, enableDirectMode
|
||||
adjustToCrippledFilesystem = ifM versionSupportsAdjustedBranch
|
||||
( ifM (liftIO $ AdjustedBranch.isGitVersionSupported)
|
||||
( AdjustedBranch.adjustToCrippledFileSystem
|
||||
, enableDirectMode
|
||||
)
|
||||
, enableDirectMode
|
||||
)
|
||||
|
||||
enableDirectMode :: Annex ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue