mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 20:36:03 +02:00
Fix rewording signed commits when the log.showsignature git config is true
For people who have the log.showsignature git config set to true, trying to reword a signed commit would put the signature verification into the subject field and the commit subject into the description field of the commit message panel. Amending commits, adding co-authors to a commit, and copying a commit message to the clipboard would all be broken in a similar way.
This commit is contained in:
parent
e4b4b6d5f4
commit
f774b7eb5c
2 changed files with 5 additions and 3 deletions
|
@ -158,6 +158,7 @@ func (self *CommitCommands) signoffFlag() string {
|
|||
func (self *CommitCommands) GetCommitMessage(commitSha string) (string, error) {
|
||||
cmdArgs := NewGitCmd("log").
|
||||
Arg("--format=%B", "--max-count=1", commitSha).
|
||||
Config("log.showsignature=false").
|
||||
ToArgv()
|
||||
|
||||
message, err := self.cmd.New(cmdArgs).DontLog().RunWithOutput()
|
||||
|
@ -167,6 +168,7 @@ func (self *CommitCommands) GetCommitMessage(commitSha string) (string, error) {
|
|||
func (self *CommitCommands) GetCommitSubject(commitSha string) (string, error) {
|
||||
cmdArgs := NewGitCmd("log").
|
||||
Arg("--format=%s", "--max-count=1", commitSha).
|
||||
Config("log.showsignature=false").
|
||||
ToArgv()
|
||||
|
||||
subject, err := self.cmd.New(cmdArgs).DontLog().RunWithOutput()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue