diff --git a/Annex/Version.hs b/Annex/Version.hs index 5827dcbd4a..19a1a23c61 100644 --- a/Annex/Version.hs +++ b/Annex/Version.hs @@ -28,6 +28,9 @@ supportedVersions = map RepoVersion [5, 7] versionForAdjustedClone :: RepoVersion versionForAdjustedClone = RepoVersion 7 +versionForAdjustedBranch :: RepoVersion +versionForAdjustedBranch = RepoVersion 7 + versionForCrippledFilesystem :: RepoVersion versionForCrippledFilesystem = RepoVersion 7 diff --git a/Assistant/MakeRepo.hs b/Assistant/MakeRepo.hs index dcae3e2339..156991cca1 100644 --- a/Assistant/MakeRepo.hs +++ b/Assistant/MakeRepo.hs @@ -15,12 +15,15 @@ import qualified Git.Command import qualified Git.Branch import qualified Annex import Annex.UUID -import Annex.Direct +import Annex.AdjustedBranch import Annex.Action +import Annex.Version +import Upgrade import Types.StandardGroups import Logs.PreferredContent import qualified Annex.Branch import Utility.Process.Transcript +import Config {- Makes a new git repository. Or, if a git repository already - exists, returns False. -} @@ -59,13 +62,16 @@ initRepo True primary_assistant_repo dir desc mgroup = inDir dir $ do , Param "-m" , Param "created repository" ] - {- Repositories directly managed by the assistant use direct mode. + {- Repositories directly managed by the assistant use v7 unlocked + - with annex.thin set. - - Automatic gc is disabled, as it can be slow. Insted, gc is done - once a day. -} when primary_assistant_repo $ do - setDirect True + void $ upgrade True versionForAdjustedBranch + void $ enterAdjustedBranch (LinkAdjustment UnlockAdjustment) + setConfig (annexConfig "thin") (Git.Config.boolConfig True) inRepo $ Git.Command.run [Param "config", Param "gc.auto", Param "0"] getUUID diff --git a/CHANGELOG b/CHANGELOG index 949cd456d5..e6958ccb19 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,8 @@ git-annex (7.20190820) UNRELEASED; urgency=medium * info: When file matching options are specified when getting info of something other than a directory, they won't have any effect, so error out to avoid confusion. + * assistant: When creating a new repository, no longer use direct + mode, instead use v7 adjusted branches with annex.thin. -- Joey Hess Sat, 24 Aug 2019 12:54:35 -0400 diff --git a/doc/todo/v7_path_toward_default.mdwn b/doc/todo/v7_path_toward_default.mdwn index 7447231861..48c8e75204 100644 --- a/doc/todo/v7_path_toward_default.mdwn +++ b/doc/todo/v7_path_toward_default.mdwn @@ -4,12 +4,11 @@ Tracking v7 progress toward becoming the default. done -## step 2: default for new direct mode repositories +## step 2: default for new repositories that used to use direct mode Done when using the command line to init in a crippled filesystem. -The assistant still creates direct mode repositories though, -and will need to enable annex.thin and adjusted unlocked branch instead. +Done when using the assistant. ## step 3: auto-upgrade from direct mode