restore old registerurl location tracking behavior
authorJoey Hess <joeyh@joeyh.name>
Wed, 5 Apr 2023 20:59:44 +0000 (16:59 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 5 Apr 2023 21:06:44 +0000 (17:06 -0400)
commit98a3ba0ea5c1b55c7dfaac761b254fd167386d20
treebbb9094c955052cb9b3d6ac69d083d30ad59c7d2
parent26a094ac1a9ba20022c82170e967e2f1cd2f0022
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
451171b7c1eaccfd0f39d4ec1d64c6964613f55a, 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
CHANGELOG
Command/RegisterUrl.hs
Command/RmUrl.hs
Command/UnregisterUrl.hs
doc/bugs/registerurl_does_not_register_if_external_remote.mdwn
doc/bugs/registerurl_does_not_register_if_external_remote/comment_8_542bd923122ba24fe9cb14d36b97f15d._comment [new file with mode: 0644]
doc/git-annex-registerurl.mdwn
doc/git-annex-rmurl.mdwn
doc/git-annex-unregisterurl.mdwn