checkGitRepository generates the git command to check if the current directory is a git repository.
(ctx context.Context)
| 122 | |
| 123 | // checkGitRepository generates the git command to check if the current directory is a git repository. |
| 124 | func (c *Command) checkGitRepository(ctx context.Context) *exec.Cmd { |
| 125 | return exec.CommandContext( |
| 126 | ctx, |
| 127 | "git", |
| 128 | "rev-parse", |
| 129 | "--is-inside-work-tree", |
| 130 | ) |
| 131 | } |
| 132 | |
| 133 | // commit generates the git command to create a commit with the provided message. |
| 134 | // It includes options to skip pre-commit hooks, sign off the commit, and handle amendments. |