diff options
-rw-r--r-- | _examples/config/main.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/_examples/config/main.go b/_examples/config/main.go index 6ccc9f6..7c5592f 100644 --- a/_examples/config/main.go +++ b/_examples/config/main.go @@ -58,6 +58,10 @@ func main() { // Get custom config param (merged in the same way git does: system -> global -> local) Info("custom.name is %s", cfg.Merged.Section("custom").Option("name")) + //In order to save the config file, you need to call SetConfig + //After calling this go to .git/config and see the custom.name added and the changes to the remote + r.Storer.SetConfig(cfg) + // Get system config params (/etc/gitconfig) systemSections := cfg.Merged.SystemConfig().Sections for _, ss := range systemSections { |