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

@ -12,7 +12,6 @@ import Network.URI
import Common.Annex
import Command
import qualified Backend
import qualified Utility.Url as Url
import qualified Command.Add
import qualified Annex
import qualified Backend.URL
@ -45,7 +44,7 @@ download url file = do
let dummykey = Backend.URL.fromUrl url
tmp <- fromRepo $ gitAnnexTmpLocation dummykey
liftIO $ createDirectoryIfMissing True (parentDir tmp)
stopUnless (liftIO $ Url.download url tmp) $ do
stopUnless (downloadUrl [url] tmp) $ do
[(backend, _)] <- Backend.chooseBackends [file]
k <- Backend.genKey tmp backend
case k of