git-annex/doc/git-annex-upgrade.mdwn
Joey Hess afe72d04ff
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.
2020-03-09 16:49:28 -04:00

48 lines
1.3 KiB
Markdown

# NAME
git-annex upgrade - upgrade repository
# SYNOPSIS
git annex upgrade
# DESCRIPTION
Upgrades the repository to the latest version.
Each git-annex repository has an annex.version in its git configuration,
that indicates the repository version. When an old repository version
becomes deprecated, git-annex will automatically upgrade it
(unless annex.autoupgraderepository is set to false). To manually upgrade,
you can use this command.
Sometimes there's a newer repository version that is not the default yet,
and then you can use this command to upgrade to it.
Currently, git-annex supports upgrades all the way back to version 0, which
was only used by its author. It's expected that git-annex will always
support upgrading from all past repository versions -- this is necessary to
allow archives to be taken offline for years and later used.
# OPTIONS
* --autoonly
Only do whatever automatic upgrade can be done, don't necessarily
upgrade to the latest version. This is used internally by git-annex.
# SEE ALSO
[[git-annex]](1)
[[git-annex-migrate]](1)
Upgrades procedures and history: <http://git-annex.branchable.com/upgrades>
News and release notes: <http://git-annex.branchable.com/news/>
# AUTHOR
Joey Hess <id@joeyh.name>
Warning: Automatically converted into a man page by mdwn2man. Edit with care.