make .noannex file prevent repo fixups
Avoid performing repository fixups for submodules and git-worktrees when there's a .noannex file that will prevent git-annex from being used in the repository. This change is ok as long as the .noannex file is really going to prevent git-annex from being used. But, init --force could override the file. Which would result in the repo being initialized without the fixups having run. To avoid that situation decided to change init, to not let --force be used to override a .noannex file. Instead the user can just delete the file.
This commit is contained in:
parent
8795fc6ba8
commit
c3f47ba389
11 changed files with 58 additions and 39 deletions
|
@ -45,7 +45,7 @@ findOrGenUUID = do
|
|||
else ifM (Annex.Branch.hasSibling <||> (isJust <$> Fields.getField Fields.autoInit))
|
||||
( do
|
||||
liftIO checkNotReadOnly
|
||||
initialize (AutoInit True) Nothing Nothing
|
||||
initialize Nothing Nothing
|
||||
getUUID
|
||||
, return NoUUID
|
||||
)
|
||||
|
|
|
@ -52,7 +52,7 @@ start os = do
|
|||
|
||||
perform :: InitOptions -> CommandPerform
|
||||
perform os = do
|
||||
initialize (AutoInit False)
|
||||
initialize
|
||||
(if null (initDesc os) then Nothing else Just (initDesc os))
|
||||
(initVersion os)
|
||||
Annex.SpecialRemote.autoEnable
|
||||
|
|
|
@ -36,6 +36,6 @@ perform s = do
|
|||
then return $ toUUID s
|
||||
else Remote.nameToUUID s
|
||||
storeUUID u
|
||||
initialize' (AutoInit False) Nothing
|
||||
initialize' Nothing
|
||||
Annex.SpecialRemote.autoEnable
|
||||
next $ return True
|
||||
|
|
|
@ -25,6 +25,6 @@ start :: CommandStart
|
|||
start = do
|
||||
showStart' "upgrade" Nothing
|
||||
whenM (isNothing <$> getVersion) $ do
|
||||
initialize (AutoInit False) Nothing Nothing
|
||||
initialize Nothing Nothing
|
||||
r <- upgrade False latestVersion
|
||||
next $ next $ return r
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue