From a4bc3d6f38e45d982fc20c7c7e84207b5140b24f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 16 Mar 2011 13:16:52 -0400 Subject: [PATCH] bare repo upgrade support --- Upgrade/V1.hs | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/Upgrade/V1.hs b/Upgrade/V1.hs index ffb774f7de..1bf3cc0e85 100644 --- a/Upgrade/V1.hs +++ b/Upgrade/V1.hs @@ -57,17 +57,21 @@ upgrade :: Annex Bool upgrade = do showSideAction "Upgrading object directory layout v1 to v2..." - moveContent - updateSymlinks - moveLocationLogs + g <- Annex.gitRepo + if Git.repoIsLocalBare g + 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 - - -- 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 moveContent :: Annex ()