summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-06-24 01:15:12 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-06-24 01:15:12 -0400
commit49d77156ac75dd9459f3e2f2be3baa3ff3b172bc (patch)
tree97a38f9ab597666c0217f683db5b3ca45493eedd
parent59b2e4ec1d7de3cfc9c477a68ee418d403bc21d7 (diff)
more upgrades fixes for bare repos
-rw-r--r--Upgrade/V2.hs13
1 files changed, 8 insertions, 5 deletions
diff --git a/Upgrade/V2.hs b/Upgrade/V2.hs
index 7f0062cf3..af8f15919 100644
--- a/Upgrade/V2.hs
+++ b/Upgrade/V2.hs
@@ -47,17 +47,20 @@ upgrade :: Annex Bool
upgrade = do
showNote "v2 to v3"
g <- Annex.gitRepo
+ let bare = Git.repoIsLocalBare g
+
Branch.create
mapM_ (\(k, f) -> inject f $ logFile k) =<< locationLogs g
mapM_ (\f -> inject f f) =<< logFiles (olddir g)
liftIO $ do
Git.run g "rm" [Param "-r", Param "-f", Param "-q", File (olddir g)]
- unless (Git.repoIsLocalBare g) $ gitAttributesUnWrite g
+ unless bare $ gitAttributesUnWrite g
- showLongNote $
- "git-annex branch created\n" ++
- "Now you should push the new branch: git push origin git-annex\n"
- showProgress
+ unless bare $ do
+ showLongNote $
+ "git-annex branch created\n" ++
+ "Now you should push the new branch: git push origin git-annex\n"
+ showProgress
return True