Skip to content

Commit

Permalink
fix: support git-commit --no-verify flag
Browse files Browse the repository at this point in the history
  • Loading branch information
SKalt committed Oct 5, 2022
1 parent c1673ed commit a5b311e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
5 changes: 3 additions & 2 deletions cmd/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func mainMode(cmd *cobra.Command, args []string) {
}
}

cc := &parser.CC{}
var cc *parser.CC

message, _ := cmd.Flags().GetStringArray("message")

Expand Down Expand Up @@ -176,7 +176,8 @@ func init() {
Cmd.Flags().Bool("no-gpg-sign", false, "see the git-commit docs for --no-gpg-sign")
Cmd.Flags().Bool("no-post-rewrite", false, "Bypass the post-rewrite hook")
Cmd.Flags().Bool("no-edit", false, "Use the selected commit message without launching an editor.")

Cmd.Flags().BoolP("no-verify", "n", false, "Bypass git hooks")
// https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---no-verify
Cmd.Flags().Bool("generate-man-page", false, "Generate a man page in your manpath")
Cmd.Flags().Bool(
"generate-shell-completion",
Expand Down
8 changes: 7 additions & 1 deletion cmd/tui.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ const ( // the order of the components
)

var (
boolFlags = [...]string{"all", "signoff", "no-post-rewrite", "no-gpg-sign"}
boolFlags = [...]string{
"all",
"signoff",
"no-post-rewrite",
"no-gpg-sign",
"no-verify", // https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---no-verify
}
)

type InputComponent interface {
Expand Down

0 comments on commit a5b311e

Please sign in to comment.