1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-12 23:41:54 +03:00

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
This commit is contained in:
Jesse Duffield
2019-04-13 13:34:12 +10:00
parent cadc74eeec
commit ab9fa291a8
4 changed files with 10 additions and 3 deletions

View File

@ -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
}