fix problems with upgrade of local remotes
authorJoey Hess <joeyh@joeyh.name>
Mon, 9 Mar 2020 20:47:57 +0000 (16:47 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 9 Mar 2020 20:49:28 +0000 (16:49 -0400)
commitafe72d04ff68ddc550dd09856d9948804c6319e0
treecb913c01e113c1e6a2e58ace441a429a813aea2c
parent3440b77d1e477bad716f5fbdbea977cbe9272c50
fix problems with upgrade of local remotes

Upgrade other repos than the current one by running git-annex upgrade
inside them, which avoids problems with upgrade code making assumptions
that the cwd will be inside the repo being upgraded.

In particular, this fixes a problem where upgrading a v7 repo to v8 caused
an ugly git error message.

I actually could not find a way to make Upgrade.V7 work properly
without changing directory to the remote. Once I got git ls-files to work,
the git cat-file failed because :path can only be used in the current git
repo.
CHANGELOG
Command/Upgrade.hs
Upgrade.hs
doc/bugs/v7_upgrade_of_local_clone_bug.mdwn
doc/git-annex-upgrade.mdwn