Added remote.name.annex-web-options config
Which is a per-remote version of the annex.web-options config. Had to plumb RemoteGitConfig through to getUrlOptions. In cases where a special remote does not use curl, there was no need to do that and I used Nothing instead. In the case of the addurl and importfeed commands, it seemed best to say that running these commands is not using the web special remote per se, so the config is not used for those commands.
This commit is contained in:
parent
932fac7772
commit
e81fd72018
19 changed files with 152 additions and 99 deletions
|
@ -268,7 +268,7 @@ findDownloads u f = catMaybes $ map mk (feedItems f)
|
|||
downloadFeed :: URLString -> FilePath -> Annex Bool
|
||||
downloadFeed url f
|
||||
| Url.parseURIRelaxed url == Nothing = giveup "invalid feed url"
|
||||
| otherwise = Url.withUrlOptions $
|
||||
| otherwise = Url.withUrlOptions Nothing $
|
||||
Url.download nullMeterUpdate Nothing url (toOsPath f)
|
||||
|
||||
startDownload :: AddUnlockedMatcher -> ImportFeedOptions -> Cache -> TMVar Bool -> ToDownload -> CommandStart
|
||||
|
@ -367,7 +367,7 @@ downloadEnclosure addunlockedmatcher opts cache cv todownload url =
|
|||
let go urlinfo = Just . maybeToList <$> addUrlFile addunlockedmatcher dlopts url urlinfo f
|
||||
if relaxedOption (downloadOptions opts)
|
||||
then go Url.assumeUrlExists
|
||||
else Url.withUrlOptions (Url.getUrlInfo url) >>= \case
|
||||
else Url.withUrlOptions Nothing (Url.getUrlInfo url) >>= \case
|
||||
Right urlinfo -> go urlinfo
|
||||
Left err -> do
|
||||
warning (UnquotedString err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue