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 upgrade = do
showSideAction "Upgrading object directory layout v1 to v2..." showSideAction "Upgrading object directory layout v1 to v2..."
moveContent g <- Annex.gitRepo
updateSymlinks if Git.repoIsLocalBare g
moveLocationLogs then do
moveContent
else do
moveContent
updateSymlinks
moveLocationLogs
-- 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 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
return True return True
moveContent :: Annex () moveContent :: Annex ()