diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2019-04-13 13:34:12 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2019-04-13 14:38:17 +1000 |
commit | ab9fa291a8be2426463a25a545f08816dbc838b0 (patch) | |
tree | 80c30114cce8a876a9e00cd1a0e6943dd882bf30 /pkg/commands | |
parent | cadc74eeec0840f8259e68364a08bdf6fad2479c (diff) |
Add skipHookPrefix to config
allows a user to specify a commit message prefix that will tell lazygit to skip
the pre-commit hook. This defaults to WIP. Setting it to the empty string will
disable the feature.
So if my message goes 'WIP: do the thing' then the pre-commit hook will not run
Diffstat (limited to 'pkg/commands')
-rw-r--r-- | pkg/commands/git.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go index ae2281ee9..265d6553e 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -334,8 +334,8 @@ func (c *GitCommand) usingGpg() bool { } // Commit commits to git -func (c *GitCommand) Commit(message string) (*exec.Cmd, error) { - command := fmt.Sprintf("git commit -m %s", c.OSCommand.Quote(message)) +func (c *GitCommand) Commit(message string, flags string) (*exec.Cmd, error) { + command := fmt.Sprintf("git commit %s -m %s", flags, c.OSCommand.Quote(message)) if c.usingGpg() { return c.OSCommand.PrepareSubProcess(c.OSCommand.Platform.shell, c.OSCommand.Platform.shellArg, command), nil } |