MCPcopy Create free account
hub / github.com/go-git/go-git / SetConfig

Method SetConfig

repository.go:559–561  ·  view source on GitHub ↗

SetConfig marshall and writes the repository config. In a filesystem backed repository this means write the `.git/config`. This function should be called with the result of `Repository.Config` and never with the output of `Repository.ConfigScoped`.

(cfg *config.Config)

Source from the content-addressed store, hash-verified

557// with the result of `Repository.Config` and never with the output of
558// `Repository.ConfigScoped`.
559func (r *Repository) SetConfig(cfg *config.Config) error {
560 return r.Storer.SetConfig(cfg)
561}
562
563// ConfigScoped returns the repository config, merged with requested scope and
564// lower. For example if, config.GlobalScope is given the local and global config

Callers

nothing calls this directly

Calls 1

SetConfigMethod · 0.65

Tested by

no test coverage detected