aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format
diff options
context:
space:
mode:
authorWes Morgan <wesmorgan@icloud.com>2020-04-06 11:20:56 -0600
committerWes Morgan <wesmorgan@icloud.com>2020-04-06 11:20:56 -0600
commit231a188e4899cc8a76fd0ca914b9fa5fe9b3175b (patch)
treef66a7e5b9a23c224230487fedf1563cd8f365477 /plumbing/format
parentecb64c048179fbc6086e7eff23136802720c8972 (diff)
downloadgo-git-231a188e4899cc8a76fd0ca914b9fa5fe9b3175b.tar.gz
Add funcs to set global & local config in Merged
Diffstat (limited to 'plumbing/format')
-rw-r--r--plumbing/format/config/merged.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/plumbing/format/config/merged.go b/plumbing/format/config/merged.go
index 3afb063..52f4b68 100644
--- a/plumbing/format/config/merged.go
+++ b/plumbing/format/config/merged.go
@@ -55,6 +55,14 @@ func (m *Merged) SystemConfig() *Config {
return m.ScopedConfig(SystemScope)
}
+func (m *Merged) SetLocalConfig(c *Config) {
+ m.scopedConfigs[LocalScope] = c
+}
+
+func (m *Merged) SetGlobalConfig(c *Config) {
+ m.scopedConfigs[GlobalScope] = c
+}
+
// Config.Section creates the section if it doesn't exist, which is not
// what we want in here.
func (c *Config) hasSection(name string) bool {