From 18a3a186e9cdb69ee503d961d8285a341d818c48 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 1 Jan 2013 13:52:47 -0400 Subject: type based git config handling for remotes Still a couple of places that use git config ad-hoc, but this is most of it done. --- Types/Remote.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Types/Remote.hs') diff --git a/Types/Remote.hs b/Types/Remote.hs index f01ae01f6..05763e4d3 100644 --- a/Types/Remote.hs +++ b/Types/Remote.hs @@ -16,6 +16,7 @@ import qualified Git import Types.Key import Types.UUID import Types.Meters +import Types.GitConfig type RemoteConfigKey = String type RemoteConfig = M.Map RemoteConfigKey String @@ -27,7 +28,7 @@ data RemoteTypeA a = RemoteType { -- enumerates remotes of this type enumerate :: a [Git.Repo], -- generates a remote of this type - generate :: Git.Repo -> UUID -> RemoteConfig -> a (RemoteA a), + generate :: Git.Repo -> UUID -> RemoteConfig -> RemoteGitConfig -> a (RemoteA a), -- initializes or changes a remote setup :: UUID -> RemoteConfig -> a RemoteConfig } @@ -64,8 +65,10 @@ data RemoteA a = Remote { whereisKey :: Maybe (Key -> a [String]), -- a Remote has a persistent configuration store config :: RemoteConfig, - -- git configuration for the remote + -- git repo for the Remote repo :: Git.Repo, + -- a Remote's configuration from git + gitconfig :: RemoteGitConfig, -- a Remote can be assocated with a specific local filesystem path localpath :: Maybe FilePath, -- a Remote can be known to be readonly -- cgit v1.2.3