reorder constructors for consistency

This commit is contained in:
Joey Hess 2024-06-04 13:11:27 -04:00
parent 3df70c5c0c
commit a31770c350
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -454,9 +454,17 @@ extractRemoteGitConfig r remotename = do
readBwRatePerSecond =<< getmaybe "bwlimit-download" readBwRatePerSecond =<< getmaybe "bwlimit-download"
, remoteAnnexAllowUnverifiedDownloads = (== Just "ACKTHPPT") $ , remoteAnnexAllowUnverifiedDownloads = (== Just "ACKTHPPT") $
getmaybe ("security-allow-unverified-downloads") getmaybe ("security-allow-unverified-downloads")
, remoteAnnexConfigUUID = toUUID <$> getmaybe "config-uuid"
, remoteAnnexMaxGitBundles = , remoteAnnexMaxGitBundles =
fromMaybe 100 (getmayberead "max-git-bundles") fromMaybe 100 (getmayberead "max-git-bundles")
, remoteAnnexConfigUUID = toUUID <$> getmaybe "config-uuid" , remoteAnnexAllowEncryptedGitRepo =
getbool "allow-encrypted-gitrepo" False
, remoteUrl =
case Git.Config.getMaybe (remoteConfig remotename "url") r of
Just (ConfigValue b)
| B.null b -> Nothing
| otherwise -> Just (decodeBS b)
_ -> Nothing
, remoteAnnexShell = getmaybe "shell" , remoteAnnexShell = getmaybe "shell"
, remoteAnnexSshOptions = getoptions "ssh-options" , remoteAnnexSshOptions = getoptions "ssh-options"
, remoteAnnexRsyncOptions = getoptions "rsync-options" , remoteAnnexRsyncOptions = getoptions "rsync-options"
@ -482,14 +490,6 @@ extractRemoteGitConfig r remotename = do
, remoteAnnexDdarRepo = getmaybe "ddarrepo" , remoteAnnexDdarRepo = getmaybe "ddarrepo"
, remoteAnnexHookType = notempty $ getmaybe "hooktype" , remoteAnnexHookType = notempty $ getmaybe "hooktype"
, remoteAnnexExternalType = notempty $ getmaybe "externaltype" , remoteAnnexExternalType = notempty $ getmaybe "externaltype"
, remoteAnnexAllowEncryptedGitRepo =
getbool "allow-encrypted-gitrepo" False
, remoteUrl =
case Git.Config.getMaybe (remoteConfig remotename "url") r of
Just (ConfigValue b)
| B.null b -> Nothing
| otherwise -> Just (decodeBS b)
_ -> Nothing
} }
where where
getbool k d = fromMaybe d $ getmaybebool k getbool k d = fromMaybe d $ getmaybebool k