summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Upgrade/V1.hs22
1 files changed, 13 insertions, 9 deletions
diff --git a/Upgrade/V1.hs b/Upgrade/V1.hs
index ffb774f7d..1bf3cc0e8 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
-
- 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
+ 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
return True
moveContent :: Annex ()