aboutsummaryrefslogtreecommitdiffstats
path: root/repository/repo.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-11-01 22:16:57 +0000
committerGitHub <noreply@github.com>2019-11-01 22:16:57 +0000
commitf5193cc76dd1a1c1bb55194a64ef90bae2278115 (patch)
tree74c5f184df4fb27bec0d6f809ce9816ec133d80f /repository/repo.go
parent11b4a1beb7e1ab8809515a5ce21e8708fba7f300 (diff)
parentf9f82957a78ea0d3cacddbc6914ce98b94ddf7bd (diff)
downloadgit-bug-f5193cc76dd1a1c1bb55194a64ef90bae2278115.tar.gz
Merge pull request #240 from MichaelMure/repo-config
repository config interface and implementation rework
Diffstat (limited to 'repository/repo.go')
-rw-r--r--repository/repo.go21
1 files changed, 4 insertions, 17 deletions
diff --git a/repository/repo.go b/repository/repo.go
index 44204493..7d655bde 100644
--- a/repository/repo.go
+++ b/repository/repo.go
@@ -30,24 +30,11 @@ type RepoCommon interface {
// GetRemotes returns the configured remotes repositories.
GetRemotes() (map[string]string, error)
- // StoreConfig store a single key/value pair in the config of the repo
- StoreConfig(key string, value string) error
+ // LocalConfig give access to the repository scoped configuration
+ LocalConfig() Config
- // ReadConfigs read all key/value pair matching the key prefix
- ReadConfigs(keyPrefix string) (map[string]string, error)
-
- // ReadConfigBool read a single boolean value from the config
- // Return ErrNoConfigEntry or ErrMultipleConfigEntry if there is zero or more than one entry
- // for this key
- ReadConfigBool(key string) (bool, error)
-
- // ReadConfigBool read a single string value from the config
- // Return ErrNoConfigEntry or ErrMultipleConfigEntry if there is zero or more than one entry
- // for this key
- ReadConfigString(key string) (string, error)
-
- // RmConfigs remove all key/value pair matching the key prefix
- RmConfigs(keyPrefix string) error
+ // GlobalConfig give access to the git global configuration
+ GlobalConfig() Config
}
// Repo represents a source code repository.