File tree 1 file changed +10
-1
lines changed
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 {
435
435
return err
436
436
}
437
437
438
- // Config return the repository config
438
+ // Config return the repository config. In a filesystem backed repository this
439
+ // means read the `.git/config`.
439
440
func (r * Repository ) Config () (* config.Config , error ) {
440
441
return r .Storer .Config ()
441
442
}
442
443
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
+
443
452
// ConfigScoped returns the repository config, merged with requested scope and
444
453
// lower. For example if, config.GlobalScope is given the local and global config
445
454
// are returned merged in one config value.
You can’t perform that action at this time.
0 commit comments