MCPcopy Create free account
hub / github.com/cwarden/git-add--interactive / GetConfigBool

Method GetConfigBool

internal/git/repository.go:79–85  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

77}
78
79func (r *Repository) GetConfigBool(key string) bool {
80 output, err := r.RunCommand("config", "--bool", key)
81 if err != nil {
82 return false
83 }
84 return strings.TrimSpace(string(output)) == "true"
85}
86
87func (r *Repository) GetColor(key, defaultColor string) string {
88 output, err := r.RunCommand("config", "--get-color", key, defaultColor)

Callers 1

TestGetConfigBoolFunction · 0.95

Calls 1

RunCommandMethod · 0.95

Tested by 1

TestGetConfigBoolFunction · 0.76