Skip to content

Commit

Permalink
fix: commit hooks no longer run with cmd-git implementation (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
lindell authored Jun 28, 2021
1 parent 6ef43a8 commit ba12d08
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/git/cmdgit/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (g *Git) Commit(commitAuthor *domain.CommitAuthor, commitMessage string) er
return err
}

cmd = exec.Command("git", "commit", "-m", commitMessage)
cmd = exec.Command("git", "commit", "--no-verify", "-m", commitMessage)

if commitAuthor != nil {
cmd.Env = append(cmd.Env,
Expand All @@ -92,6 +92,9 @@ func (g *Git) Commit(commitAuthor *domain.CommitAuthor, commitMessage string) er
}

_, err = g.run(cmd)
if err != nil {
return err
}

if err := g.logDiff(); err != nil {
return err
Expand Down

0 comments on commit ba12d08

Please sign in to comment.