mask remotes, partial implementation
Everything implemented except for passing through to the masked remote. Which should be trivial.
This commit is contained in:
parent
89fccc15a8
commit
1313cc4d60
6 changed files with 218 additions and 1 deletions
|
@ -441,6 +441,7 @@ data RemoteGitConfig = RemoteGitConfig
|
|||
, remoteAnnexDdarRepo :: Maybe String
|
||||
, remoteAnnexHookType :: Maybe String
|
||||
, remoteAnnexExternalType :: Maybe String
|
||||
, remoteAnnexMask :: Maybe String
|
||||
}
|
||||
|
||||
{- The Git.Repo is the local repository, which has the remote with the
|
||||
|
@ -541,6 +542,7 @@ extractRemoteGitConfig r remotename = do
|
|||
, remoteAnnexDdarRepo = getmaybe DdarRepoField
|
||||
, remoteAnnexHookType = notempty $ getmaybe HookTypeField
|
||||
, remoteAnnexExternalType = notempty $ getmaybe ExternalTypeField
|
||||
, remoteAnnexMask = notempty $ getmaybe MaskField
|
||||
}
|
||||
where
|
||||
getbool k d = fromMaybe d $ getmaybebool k
|
||||
|
@ -623,6 +625,7 @@ data RemoteGitConfigField
|
|||
| DdarRepoField
|
||||
| HookTypeField
|
||||
| ExternalTypeField
|
||||
| MaskField
|
||||
deriving (Enum, Bounded)
|
||||
|
||||
remoteGitConfigField :: RemoteGitConfigField -> (MkRemoteConfigKey, ProxyInherited)
|
||||
|
@ -693,6 +696,7 @@ remoteGitConfigField = \case
|
|||
DdarRepoField -> uninherited True "ddarrepo"
|
||||
HookTypeField -> uninherited True "hooktype"
|
||||
ExternalTypeField -> uninherited True "externaltype"
|
||||
MaskField -> uninherited True "mask"
|
||||
where
|
||||
inherited True f = (MkRemoteAnnexConfigKey f, ProxyInherited True)
|
||||
inherited False f = (MkRemoteConfigKey f, ProxyInherited True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue