don't frontload reconcileStaged in git-annex init
init: Avoid scanning for annexed files, which can be lengthy in a
large repository. Instead that scan is done on demand. This lets git-annex
init be run and some query commands be used in a repository without
waiting.
Note that autoinit already behaved this way, so while this will mean some
commands like git-annex get/unlock/add will do the scan the first time run,
that is not really a significant behavior change.
And, it's really better to have a consistent behavior. The reason for
the inconsistency was a strange bug discussed in
b3c4579c79
. Avoiding reconcileStaged in
init will keep avoiding whatever that was.
Sponsored-by: Dartmouth College's DANDI project
This commit is contained in:
parent
c834d2025a
commit
2b014f1a8b
8 changed files with 26 additions and 16 deletions
|
@ -47,7 +47,7 @@ findOrGenUUID = do
|
|||
else ifM (Annex.Branch.hasSibling <||> (isJust <$> Fields.getField Fields.autoInit))
|
||||
( do
|
||||
liftIO checkNotReadOnly
|
||||
initialize True Nothing Nothing
|
||||
initialize Nothing Nothing
|
||||
getUUID
|
||||
, return NoUUID
|
||||
)
|
||||
|
|
|
@ -75,7 +75,7 @@ perform os = do
|
|||
Just v | v /= wantversion ->
|
||||
giveup $ "This repository is already a initialized with version " ++ show (fromRepoVersion v) ++ ", not changing to requested version."
|
||||
_ -> noop
|
||||
initialize False
|
||||
initialize
|
||||
(if null (initDesc os) then Nothing else Just (initDesc os))
|
||||
(initVersion os)
|
||||
unless (noAutoEnable os)
|
||||
|
|
|
@ -35,6 +35,6 @@ perform s = do
|
|||
then return $ toUUID s
|
||||
else Remote.nameToUUID s
|
||||
storeUUID u
|
||||
checkInitializeAllowed $ initialize' False Nothing
|
||||
checkInitializeAllowed $ initialize' Nothing
|
||||
Annex.SpecialRemote.autoEnable
|
||||
next $ return True
|
||||
|
|
|
@ -45,6 +45,6 @@ start (UpgradeOptions { autoOnly = True }) =
|
|||
start _ =
|
||||
starting "upgrade" (ActionItemOther Nothing) (SeekInput []) $ do
|
||||
whenM (isNothing <$> getVersion) $ do
|
||||
initialize False Nothing Nothing
|
||||
initialize Nothing Nothing
|
||||
r <- upgrade False latestVersion
|
||||
next $ return r
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue