Add --url option and url= preferred content expression
authorJoey Hess <joeyh@joeyh.name>
Mon, 21 Jul 2025 16:13:40 +0000 (12:13 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 21 Jul 2025 16:13:40 +0000 (12:13 -0400)
commitd364e434c8a99931c6e865799e0737d630126d4b
tree839c862479b7ba930f908ceaa305eca79fc37b74
parent549569533baf414b0cfb0a555d88f00495b95ff3
Add --url option and url= preferred content expression

To match content that is recorded as present in an url.

Note that, this cannot ask remotes to provide an url using whereisKey, like
whereis does. Because preferred content expressions need to match the same
from multiple perspectives, and the remote would not always be available.

That's why the docs say "recorded as present", but still this may be
surprising to some who see an url in whereis output and are surprised they
cannot match on it.

The use of getDownloader is to strip the downloader prefix from urls like
"yt:". Note that, when OtherDownloader is used, this strips the ":" prefix,
and allows matching on those urls too.
Annex/FileMatcher.hs
CHANGELOG
CmdLine/GitAnnex/Options.hs
Limit.hs
doc/git-annex-matching-options.mdwn
doc/git-annex-preferred-content.mdwn
doc/todo/match_on_url.mdwn