From 231a188e4899cc8a76fd0ca914b9fa5fe9b3175b Mon Sep 17 00:00:00 2001 From: Wes Morgan Date: Mon, 6 Apr 2020 11:20:56 -0600 Subject: Add funcs to set global & local config in Merged --- plumbing/format/config/merged.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'plumbing/format') 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 { -- cgit