Added remote.name.annex-web-options configuration setting, which can be used to provide parameters to whichever of wget or curl git-annex uses (depends on which is available, but most of their important options suitable for use here are the same).

This commit is contained in:
Joey Hess 2012-01-02 14:20:20 -04:00
parent 50ebfd265f
commit aa0882691b
7 changed files with 36 additions and 13 deletions

View file

@ -209,10 +209,8 @@ copyFromRemote r key file
loc <- liftIO $ gitAnnexLocation key r
rsyncOrCopyFile params loc file
| Git.repoIsSsh r = rsyncHelper =<< rsyncParamsRemote r True key file
| Git.repoIsHttp r = liftIO $ downloadurls $ keyUrls r key
| Git.repoIsHttp r = Annex.Content.downloadUrl (keyUrls r key) file
| otherwise = error "copying from non-ssh, non-http repo not supported"
where
downloadurls us = untilTrue us $ \u -> Url.download u file
{- Tries to copy a key's content to a remote's annex. -}
copyToRemote :: Git.Repo -> Key -> Annex Bool