MCPcopy Create free account
hub / github.com/conventionalcommit/commitlint / unsetGitConf

Function unsetGitConf

internal/cmd/remove.go:42–52  ·  view source on GitHub ↗

unsetGitConf removes the core.hooksPath entry from git config (local or global).

(isGlobal bool)

Source from the content-addressed store, hash-verified

40
41// unsetGitConf removes the core.hooksPath entry from git config (local or global).
42func unsetGitConf(isGlobal bool) error {
43 args := []string{"config"}
44 if isGlobal {
45 args = append(args, "--global")
46 }
47 args = append(args, "--unset", "core.hooksPath")
48
49 cmd := exec.Command("git", args...)
50 cmd.Stderr = os.Stderr
51 return cmd.Run()
52}
53
54// promptConfirm prints prompt and waits for the user to type y/yes or anything else.
55// Returns true only when the user confirms with "y" or "yes" (case-insensitive).

Callers 1

gitRemoveHookFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected