File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -435,11 +435,20 @@ func cleanUpDir(path string, all bool) error {
435435 return err
436436}
437437
438- // Config return the repository config
438+ // Config return the repository config. In a filesystem backed repository this
439+ // means read the `.git/config`.
439440func (r * Repository ) Config () (* config.Config , error ) {
440441 return r .Storer .Config ()
441442}
442443
444+ // SetConfig marshall and writes the repository config. In a filesystem backed
445+ // repository this means write the `.git/config`. This function should be called
446+ // with the result of `Repository.Config` and never with the output of
447+ // `Repository.ConfigScoped`.
448+ func (r * Repository ) SetConfig (cfg * config.Config ) error {
449+ return r .Storer .SetConfig (cfg )
450+ }
451+
443452// ConfigScoped returns the repository config, merged with requested scope and
444453// lower. For example if, config.GlobalScope is given the local and global config
445454// are returned merged in one config value.
You can’t perform that action at this time.
0 commit comments