MCPcopy Index your code
hub / github.com/nikivdev/go / setGitLocalConfig

Function setGitLocalConfig

cli/flow/main.go:4333–4344  ·  view source on GitHub ↗
(key, value string)

Source from the content-addressed store, hash-verified

4331}
4332
4333func setGitLocalConfig(key, value string) error {
4334 cmd := exec.Command("git", "config", "--local", key, value)
4335 out, err := cmd.CombinedOutput()
4336 if err != nil {
4337 trimmed := strings.TrimSpace(string(out))
4338 if trimmed != "" {
4339 return fmt.Errorf("git config --local %s %s: %s", key, value, trimmed)
4340 }
4341 return fmt.Errorf("git config --local %s %s: %w", key, value, err)
4342 }
4343 return nil
4344}
4345
4346func gitWorkingTreeDirty() (bool, error) {
4347 out, err := exec.Command("git", "status", "--porcelain").Output()

Callers 1

runGitMirrorSetupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected