1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-11 12:48:10 +03:00

Prompt for commit message when moving a custom patch to a new commit

This commit is contained in:
Stefan Haller
2023-07-20 11:17:01 +02:00
parent 1b05ba252c
commit c21633b1be
5 changed files with 39 additions and 22 deletions

View File

@ -107,14 +107,6 @@ func (self *CommitCommands) signoffFlag() string {
}
}
// Get the subject of the HEAD commit
func (self *CommitCommands) GetHeadCommitMessage() (string, error) {
cmdArgs := NewGitCmd("log").Arg("-1", "--pretty=%s").ToArgv()
message, err := self.cmd.New(cmdArgs).DontLog().RunWithOutput()
return strings.TrimSpace(message), err
}
func (self *CommitCommands) GetCommitMessage(commitSha string) (string, error) {
cmdArgs := NewGitCmd("rev-list").
Arg("--format=%B", "--max-count=1", commitSha).