Use git-annex init --version=6 to get v6 for now
Not ready to make it default because of the direct mode upgrade needing to all happen at once.
This commit is contained in:
parent
b9588fe69e
commit
7d0e79b9e1
10 changed files with 63 additions and 30 deletions
|
@ -57,8 +57,8 @@ genDescription Nothing = do
|
|||
return $ concat [hostname, ":", reldir]
|
||||
#endif
|
||||
|
||||
initialize :: Maybe String -> Annex ()
|
||||
initialize mdescription = do
|
||||
initialize :: Maybe String -> Maybe Version -> Annex ()
|
||||
initialize mdescription mversion = do
|
||||
{- Has to come before any commits are made as the shared
|
||||
- clone heuristic expects no local objects. -}
|
||||
sharedclone <- checkSharedClone
|
||||
|
@ -68,7 +68,7 @@ initialize mdescription = do
|
|||
ensureCommit $ Annex.Branch.create
|
||||
|
||||
prepUUID
|
||||
initialize'
|
||||
initialize' mversion
|
||||
|
||||
initSharedClone sharedclone
|
||||
|
||||
|
@ -77,16 +77,18 @@ initialize mdescription = do
|
|||
|
||||
-- Everything except for uuid setup, shared clone setup, and initial
|
||||
-- description.
|
||||
initialize' :: Annex ()
|
||||
initialize' = do
|
||||
initialize' :: Maybe Version -> Annex ()
|
||||
initialize' mversion = do
|
||||
checkLockSupport
|
||||
checkFifoSupport
|
||||
checkCrippledFileSystem
|
||||
unlessM isBare $
|
||||
hookWrite preCommitHook
|
||||
setDifferences
|
||||
setVersion currentVersion
|
||||
configureSmudgeFilter
|
||||
unlessM (isJust <$> getVersion) $
|
||||
setVersion (fromMaybe defaultVersion mversion)
|
||||
whenM versionSupportsUnlockedPointers
|
||||
configureSmudgeFilter
|
||||
ifM (crippledFileSystem <&&> not <$> isBare)
|
||||
( do
|
||||
enableDirectMode
|
||||
|
@ -115,7 +117,7 @@ ensureInitialized :: Annex ()
|
|||
ensureInitialized = getVersion >>= maybe needsinit checkUpgrade
|
||||
where
|
||||
needsinit = ifM Annex.Branch.hasSibling
|
||||
( initialize Nothing
|
||||
( initialize Nothing Nothing
|
||||
, error "First run: git-annex init"
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue