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)
| 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. |
| 94 | func (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. |
no outgoing calls
no test coverage detected