diff options
author | Michael Muré <batolettre@gmail.com> | 2019-12-10 00:42:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-10 00:42:23 +0100 |
commit | f1ed857cbd3a253d77b31c0c896fdc4ade40844f (patch) | |
tree | d1efe28a1fa666039bf8180bbed0202f0437910f /repository/repo.go | |
parent | 69af7a1e0c2647c354fd9c5b55a254ba677200e1 (diff) | |
parent | 58c0e5aac97eabc02fa890123f3845ae6fe632a8 (diff) | |
download | git-bug-f1ed857cbd3a253d77b31c0c896fdc4ade40844f.tar.gz |
Merge pull request #271 from MichaelMure/bridge-credentials
bridge: huge refactor to accept multiple kind of credentials
Diffstat (limited to 'repository/repo.go')
-rw-r--r-- | repository/repo.go | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/repository/repo.go b/repository/repo.go index 71bd7a8e..e8517508 100644 --- a/repository/repo.go +++ b/repository/repo.go @@ -15,6 +15,15 @@ var ( ErrMultipleConfigEntry = errors.New("multiple config entry for the given key") ) +// RepoConfig access the configuration of a repository +type RepoConfig interface { + // LocalConfig give access to the repository scoped configuration + LocalConfig() Config + + // GlobalConfig give access to the git global configuration + GlobalConfig() Config +} + // RepoCommon represent the common function the we want all the repo to implement type RepoCommon interface { // GetPath returns the path to the repo. @@ -31,16 +40,11 @@ type RepoCommon interface { // GetRemotes returns the configured remotes repositories. GetRemotes() (map[string]string, error) - - // LocalConfig give access to the repository scoped configuration - LocalConfig() Config - - // GlobalConfig give access to the git global configuration - GlobalConfig() Config } // Repo represents a source code repository. type Repo interface { + RepoConfig RepoCommon // FetchRefs fetch git refs from a remote |