mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 20:36:03 +02:00
Add option to allow --verbose commit in editor commits
This commit is contained in:
parent
cceff63823
commit
d98130c3ef
4 changed files with 27 additions and 1 deletions
|
@ -62,7 +62,7 @@ func (self *CommitCommands) CommitCmdObj(message string) oscommands.ICmdObj {
|
|||
|
||||
// runs git commit without the -m argument meaning it will invoke the user's editor
|
||||
func (self *CommitCommands) CommitEditorCmdObj() oscommands.ICmdObj {
|
||||
return self.cmd.New(fmt.Sprintf("git commit%s", self.signoffFlag()))
|
||||
return self.cmd.New(fmt.Sprintf("git commit%s%s", self.signoffFlag(), self.verboseFlag()))
|
||||
}
|
||||
|
||||
func (self *CommitCommands) signoffFlag() string {
|
||||
|
@ -73,6 +73,14 @@ func (self *CommitCommands) signoffFlag() string {
|
|||
}
|
||||
}
|
||||
|
||||
func (self *CommitCommands) verboseFlag() string {
|
||||
if self.UserConfig.Git.Commit.Verbose {
|
||||
return " --verbose"
|
||||
} else {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
// Get the subject of the HEAD commit
|
||||
func (self *CommitCommands) GetHeadCommitMessage() (string, error) {
|
||||
message, err := self.cmd.New("git log -1 --pretty=%s").DontLog().RunWithOutput()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue