bare repo upgrade support

This commit is contained in:
Joey Hess 2011-03-16 13:16:52 -04:00
parent 1443fcfe02
commit a4bc3d6f38

View file

@ -57,17 +57,21 @@ upgrade :: Annex Bool
upgrade = do
showSideAction "Upgrading object directory layout v1 to v2..."
g <- Annex.gitRepo
if Git.repoIsLocalBare g
then do
moveContent
else do
moveContent
updateSymlinks
moveLocationLogs
setVersion
-- add new line to auto-merge hashed location logs
-- this commits, so has to come after the upgrade
g <- Annex.gitRepo
liftIO $ Command.Init.gitAttributesWrite g
setVersion
return True
moveContent :: Annex ()