more upgrades fixes for bare repos
This commit is contained in:
parent
59b2e4ec1d
commit
49d77156ac
1 changed files with 8 additions and 5 deletions
|
@ -47,13 +47,16 @@ upgrade :: Annex Bool
|
||||||
upgrade = do
|
upgrade = do
|
||||||
showNote "v2 to v3"
|
showNote "v2 to v3"
|
||||||
g <- Annex.gitRepo
|
g <- Annex.gitRepo
|
||||||
|
let bare = Git.repoIsLocalBare g
|
||||||
|
|
||||||
Branch.create
|
Branch.create
|
||||||
mapM_ (\(k, f) -> inject f $ logFile k) =<< locationLogs g
|
mapM_ (\(k, f) -> inject f $ logFile k) =<< locationLogs g
|
||||||
mapM_ (\f -> inject f f) =<< logFiles (olddir g)
|
mapM_ (\f -> inject f f) =<< logFiles (olddir g)
|
||||||
liftIO $ do
|
liftIO $ do
|
||||||
Git.run g "rm" [Param "-r", Param "-f", Param "-q", File (olddir g)]
|
Git.run g "rm" [Param "-r", Param "-f", Param "-q", File (olddir g)]
|
||||||
unless (Git.repoIsLocalBare g) $ gitAttributesUnWrite g
|
unless bare $ gitAttributesUnWrite g
|
||||||
|
|
||||||
|
unless bare $ do
|
||||||
showLongNote $
|
showLongNote $
|
||||||
"git-annex branch created\n" ++
|
"git-annex branch created\n" ++
|
||||||
"Now you should push the new branch: git push origin git-annex\n"
|
"Now you should push the new branch: git push origin git-annex\n"
|
||||||
|
|
Loading…
Add table
Reference in a new issue