git-annex/doc/git-annex-unregisterurl.mdwn
Joey Hess 98a3ba0ea5
restore old registerurl location tracking behavior
registerurl: When an url is claimed by a special remote other than the web,
update location tracking for that special remote.

registerurl's behavior was changed in commit
451171b7c1, apparently accidentially to not
update location tracking except for the web.

This makes registerurl followed by unregisterurl not be a no-op, when the
url happens to be claimed by a remote other than the web. It is a noop when
the url is unclaimed except by the web. I don't like the inconsistency,
and wish that registerurl and unregisterurl never updated location
tracking, which would be more in keeping with them being plumbing.

But there is the fact that it used to behave this way, and also it was
inconsistent that it updated location tracking for the web but not for
other remotes, unlike addurl. And there's an argument that the user might
not know what remote to expect to claim an url, so would be considerably in
the dark when using registerurl. (Although they have to know what content
gets downloaded, since they specify a key..)

Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
2023-04-05 17:06:44 -04:00

66 lines
1.7 KiB
Markdown

# NAME
git-annex unregisterurl - unregisters an url for a key
# SYNOPSIS
git annex unregisterurl `[key url]`
# DESCRIPTION
This plumbing-level command can be used to unregister urls when keys can
no longer be downloaded from them.
Normally the key is a git-annex formatted key. However, if the key cannot be
parsed as a key, and is a valid url, an URL key is constructed from the url.
Unregistering a key's last web url will make git-annex no longer treat content
as being present in the web special remote. If some other special remote
claims the url, unregistering the url will not update presence information
for it, because the content may still be present on the remote.
# OPTIONS
* `--remote=name|uuid`
Indicate that the url is expected to be claimed by the specified remote.
If some other remote claims the url instead, unregistering it will fail.
Note that `--remote=web` will prevent any other remote from claiming
the url.
* `--batch`
In batch input mode, lines are read from stdin, and each line
should contain a key and url, separated by a single space.
* `-z`
When in batch mode, the input is delimited by nulls instead of the usual
newlines.
* `--json`
Enable JSON output. This is intended to be parsed by programs that use
git-annex. Each line of output is a JSON object.
* `--json-error-messages`
Messages that would normally be output to standard error are included in
the json instead.
* Also the [[git-annex-common-options]](1) can be used.
# SEE ALSO
[[git-annex]](1)
[[git-annex-registerurl]](1)
[[git-annex-rmurl]](1)
# AUTHOR
Joey Hess <id@joeyh.name>
Warning: Automatically converted into a man page by mdwn2man. Edit with care.