assistant: When creating a new repository use v7 adjusted branches with annex.thin
Rather than direct mode, which this is a small step on the path to removing. Init on a crippled filesystem already used v7 adjusted branches, and like that, this doesn't pose any interoperability issues with old versions of git-annex that clone the same repo, because files are only unlocked on the adjusted branch.
This commit is contained in:
parent
b599e8e6ac
commit
2fd27c6df5
4 changed files with 16 additions and 6 deletions
|
@ -28,6 +28,9 @@ supportedVersions = map RepoVersion [5, 7]
|
|||
versionForAdjustedClone :: RepoVersion
|
||||
versionForAdjustedClone = RepoVersion 7
|
||||
|
||||
versionForAdjustedBranch :: RepoVersion
|
||||
versionForAdjustedBranch = RepoVersion 7
|
||||
|
||||
versionForCrippledFilesystem :: RepoVersion
|
||||
versionForCrippledFilesystem = RepoVersion 7
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 <id@joeyh.name> Sat, 24 Aug 2019 12:54:35 -0400
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue