$> git annex --mumba 2>&1 | grep -e url
addurl URL ... add urls to annex
rmurl FILE URL ... record file is not available at url
registerurl KEY URL registers an url for a key
$> git annex version | head -n 1
git-annex version: 8.20210223-1~ndall+1
So ATM there is addurl/rmurl when operating on a FILE, and there is registerurl
when operating on a KEY, but there seems to be no way to unregisterurl
as to rmurl
from a KEY. I have not found how could it be possibly done ATM without direct editing of .web files in the git-annex branch.
edit 1: well, instead of adding unregisterurl
could be done by adding --key
flag to rmurl
I think.
Fwiw adding
--key
tormurl
sounds nice to me, and, since it looks like RmUrl.hs already maps from file to key, I'd guess that be a natural addition.I think you could use
setpresentkey
. So for a plain web URL:I said:
Never mind, I don't think that's a good idea, since it's not operating on a particular URL and adjusting the log.web file.
After using setpresentkey git-annex still has the url registered and a later addurl of a new url would make git-annex also start trying the old url. Also, if there are several urls, you might only want to remove one, not remove it from the web special remote entirely as setpresentkey does.
rmurl --key
would be fine until a batch version was wanted, and then something would need to be done about ?em>--key. Which would be good to solve generally somehow, but otoh,git-annex unregisterurl
neatly avoids that more general problem. Also, it makes sense that a registerurl user would look for a dual command like unregisterurl before looking in rmurl for a way to do it.So I think unregisterurl is the right thing to add.