MCPcopy
hub / github.com/git-lfs/git-lfs / NewReadOnlyConfig

Function NewReadOnlyConfig

git/config.go:45–50  ·  view source on GitHub ↗

NewReadOnlyConfig creates a new configuration that returns an error if an attempt to write to the configuration is made.

(workdir, gitdir string)

Source from the content-addressed store, hash-verified

43// NewReadOnlyConfig creates a new configuration that returns an error if an
44// attempt to write to the configuration is made.
45func NewReadOnlyConfig(workdir, gitdir string) *Configuration {
46 cfg := NewConfig(workdir, gitdir)
47 cfg.readOnly = true
48 return cfg
49
50}
51
52func ParseConfigLines(lines string, onlySafeKeys bool) *ConfigurationSource {
53 return &ConfigurationSource{

Callers 6

TestDoWithAuthApproveFunction · 0.92
TestDoWithAuthRejectFunction · 0.92
TestDoWithAuthNoRetryFunction · 0.92
TestDoAPIRequestWithAuthFunction · 0.92
TestGetCredsFunction · 0.92
TestReadOnlyConfigFunction · 0.85

Calls 1

NewConfigFunction · 0.85

Tested by 6

TestDoWithAuthApproveFunction · 0.74
TestDoWithAuthRejectFunction · 0.74
TestDoWithAuthNoRetryFunction · 0.74
TestDoAPIRequestWithAuthFunction · 0.74
TestGetCredsFunction · 0.74
TestReadOnlyConfigFunction · 0.68