MCPcopy Create free account
hub / github.com/appleboy/CodeGPT / hookPath

Method hookPath

git/git.go:94–106  ·  view source on GitHub ↗

hookPath generates the git command to get the path of the hooks directory. This is used to locate where git hooks are stored.

(ctx context.Context)

Source from the content-addressed store, hash-verified

92// hookPath generates the git command to get the path of the hooks directory.
93// This is used to locate where git hooks are stored.
94func (c *Command) hookPath(ctx context.Context) *exec.Cmd {
95 args := []string{
96 "rev-parse",
97 "--git-path",
98 "hooks",
99 }
100
101 return exec.CommandContext(
102 ctx,
103 "git",
104 args...,
105 )
106}
107
108// gitDir generates the git command to get the path of the git directory.
109// This is used to determine the location of the .git directory.

Callers 2

InstallHookMethod · 0.95
UninstallHookMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected