diff options
author | Joey Hess <joey@kitenet.net> | 2011-03-16 13:16:52 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-03-16 13:16:52 -0400 |
commit | a4bc3d6f38e45d982fc20c7c7e84207b5140b24f (patch) | |
tree | 58b5bdf8bce3d8ac726b7d2bef5e23ca25db4390 | |
parent | 1443fcfe022028c2c074fc555d1e0d595fd4db95 (diff) |
bare repo upgrade support
-rw-r--r-- | Upgrade/V1.hs | 22 |
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 () |