add retry configuration (not used yet)

This commit is contained in:
Joey Hess 2018-03-24 10:37:25 -04:00
parent 380dba1a2c
commit b3dc4ccff5
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 22 additions and 1 deletions

View file

@ -90,6 +90,8 @@ data GitConfig = GitConfig
, annexPidLockTimeout :: Seconds
, annexAddUnlocked :: Bool
, annexSecureHashesOnly :: Bool
, annexRetry :: Maybe Integer
, annexRetryDelay :: Maybe Seconds
, coreSymlinks :: Bool
, coreSharedRepository :: SharedRepository
, receiveDenyCurrentBranch :: DenyCurrentBranch
@ -154,6 +156,9 @@ extractGitConfig r = GitConfig
getmayberead (annex "pidlocktimeout")
, annexAddUnlocked = getbool (annex "addunlocked") False
, annexSecureHashesOnly = getbool (annex "securehashesonly") False
, annexRetry = getmayberead (annex "retry")
, annexRetryDelay = Seconds
<$> getmayberead (annex "retrydelay")
, coreSymlinks = getbool "core.symlinks" True
, coreSharedRepository = getSharedRepository r
, receiveDenyCurrentBranch = getDenyCurrentBranch r
@ -208,6 +213,8 @@ data RemoteGitConfig = RemoteGitConfig
, remoteAnnexStopCommand :: Maybe String
, remoteAnnexAvailability :: Maybe Availability
, remoteAnnexBare :: Maybe Bool
, remoteAnnexRetry :: Maybe Integer
, remoteAnnexRetryDelay :: Maybe Seconds
{- These settings are specific to particular types of remotes
- including special remotes. -}
@ -259,7 +266,9 @@ extractRemoteGitConfig r remotename = do
, remoteAnnexStopCommand = notempty $ getmaybe "stop-command"
, remoteAnnexAvailability = getmayberead "availability"
, remoteAnnexBare = getmaybebool "bare"
, remoteAnnexRetry = getmayberead "retry"
, remoteAnnexRetryDelay = Seconds
<$> getmayberead "retrydelay"
, remoteAnnexShell = getmaybe "shell"
, remoteAnnexSshOptions = getoptions "ssh-options"
, remoteAnnexRsyncOptions = getoptions "rsync-options"

View file

@ -1248,6 +1248,18 @@ Here are all the supported configuration settings.
git-annex caches UUIDs of remote repositories here.
* `remote.<name>.annex-retry`, `annex.retry`
Configure retries of failed transfers on a per-remote and general
basis, respectively. The value is the number of retries that can be
made of the same transfer. (default 0)
* `remote.<name>.annex-retry-delay`, `annex.retry-delay`
Number of seconds to delay before the first retry of a transfer.
When making multiple retries of the same transfer, the delay
doubles after each retry. (default 1)
* `remote.<name>.annex-checkuuid`
This only affects remotes that have their url pointing to a directory on