diff options
author | Michael Muré <batolettre@gmail.com> | 2018-09-24 15:21:34 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-09-24 15:21:34 +0200 |
commit | 666586c5b92b64a64aea22927cfb3754861623a1 (patch) | |
tree | fa2e850fbc8a0f694ced781cc1a599a6dce1e535 /repository/repo.go | |
parent | a122d533f6b3e46ab4c79bd39bbb764d59824983 (diff) | |
download | git-bug-666586c5b92b64a64aea22927cfb3754861623a1.tar.gz |
repo: add functions to read/write git config
Diffstat (limited to 'repository/repo.go')
-rw-r--r-- | repository/repo.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/repository/repo.go b/repository/repo.go index 0cddf38a..c029a145 100644 --- a/repository/repo.go +++ b/repository/repo.go @@ -9,6 +9,7 @@ import ( "github.com/MichaelMure/git-bug/util/lamport" ) +// RepoCommon represent the common function the we want all the repo to implement type RepoCommon interface { // GetPath returns the path to the repo. GetPath() string @@ -21,6 +22,12 @@ type RepoCommon interface { // GetCoreEditor returns the name of the editor that the user has used to configure git. GetCoreEditor() (string, error) + + // StoreConfig store a single key/value pair in the config of the repo + StoreConfig(key string, value string) error + + // ReadConfigs read all key/value pair matching the key prefix + ReadConfigs(keyPrefix string) (map[string]string, error) } // Repo represents a source code repository. |