default to v7 adjusted unlocked in crippled filesystem
init: When in a crippled filesystem, initialize a v7 repository using an adjusted unlocked branch, instead of a direct mode repository. Direct mode is deprecated, so this makes sense to do already I hope. This commit was sponsored by Ole-Morten Duesund on Patreon.
This commit is contained in:
parent
5bb4308e1f
commit
d59995b9ee
2 changed files with 4 additions and 18 deletions
|
@ -21,7 +21,6 @@ module Annex.Init (
|
|||
import Annex.Common
|
||||
import qualified Annex
|
||||
import qualified Git
|
||||
import qualified Git.LsFiles
|
||||
import qualified Git.Config
|
||||
import qualified Git.Objects
|
||||
import qualified Annex.Branch
|
||||
|
@ -33,7 +32,6 @@ import Types.RepoVersion
|
|||
import Annex.Version
|
||||
import Annex.Difference
|
||||
import Annex.UUID
|
||||
import Annex.Link
|
||||
import Annex.WorkTree
|
||||
import Config
|
||||
import Config.Smudge
|
||||
|
@ -122,12 +120,7 @@ initialize' ai mversion = checkCanInitialize ai $ do
|
|||
InAdjustedClone -> return ()
|
||||
NotInAdjustedClone ->
|
||||
ifM (crippledFileSystem <&&> (not <$> isBareRepo))
|
||||
( ifM versionSupportsUnlockedPointers
|
||||
( adjustToCrippledFileSystem
|
||||
, do
|
||||
enableDirectMode
|
||||
setDirect True
|
||||
)
|
||||
-- Handle case where this repo was cloned from a
|
||||
-- direct mode repo
|
||||
, unlessM isBareRepo
|
||||
|
@ -270,15 +263,6 @@ checkFifoSupport = unlessM probeFifoSupport $ do
|
|||
warning "Disabling ssh connection caching."
|
||||
setConfig (annexConfig "sshcaching") (Git.Config.boolConfig False)
|
||||
|
||||
enableDirectMode :: Annex ()
|
||||
enableDirectMode = unlessM isDirect $ do
|
||||
warning "Enabling direct mode."
|
||||
top <- fromRepo Git.repoPath
|
||||
(l, clean) <- inRepo $ Git.LsFiles.inRepo [top]
|
||||
forM_ l $ \f ->
|
||||
maybe noop (`toDirect` f) =<< isAnnexLink f
|
||||
void $ liftIO clean
|
||||
|
||||
checkSharedClone :: Annex Bool
|
||||
checkSharedClone = inRepo Git.Objects.isSharedClone
|
||||
|
||||
|
|
|
@ -6,6 +6,8 @@ git-annex (7.20181025) UNRELEASED; urgency=medium
|
|||
* Direct mode repositories are deprecated; they have many problems
|
||||
that v7 fixes, so upgrading them now is recommended (but not yet
|
||||
required): git annex upgrade --version=7
|
||||
* init: When in a crippled filesystem, initialize a v7 repository
|
||||
using an adjusted unlocked branch, instead of a direct mode repository.
|
||||
* At long last there's a way to hide annexed files whose content
|
||||
is missing from the working tree: git-annex adjust --hide-missing
|
||||
See https://git-annex.branchable.com/tips/hiding_missing_files/
|
||||
|
|
Loading…
Reference in a new issue