1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-03-21 21:47:32 +02:00

chore(loaders): add -c log.showSignature=false flag to the rebasing commit loader

This commit is contained in:
Ryooooooga 2022-05-06 23:04:58 +09:00
parent f789e21377
commit 490a964432
No known key found for this signature in database
GPG Key ID: 07CF200DFCC20C25

View File

@ -212,7 +212,7 @@ func (self *CommitLoader) getHydratedRebasingCommits(rebaseMode enums.RebaseMode
// I suspect that will cause some damage // I suspect that will cause some damage
cmdObj := self.cmd.New( cmdObj := self.cmd.New(
fmt.Sprintf( fmt.Sprintf(
"git show %s --no-patch --oneline %s --abbrev=%d", "git -c log.showSignature=false show %s --no-patch --oneline %s --abbrev=%d",
strings.Join(commitShas, " "), strings.Join(commitShas, " "),
prettyFormat, prettyFormat,
20, 20,
@ -222,14 +222,12 @@ func (self *CommitLoader) getHydratedRebasingCommits(rebaseMode enums.RebaseMode
hydratedCommits := make([]*models.Commit, 0, len(commits)) hydratedCommits := make([]*models.Commit, 0, len(commits))
i := 0 i := 0
err = cmdObj.RunAndProcessLines(func(line string) (bool, error) { err = cmdObj.RunAndProcessLines(func(line string) (bool, error) {
if canExtractCommit(line) { commit := self.extractCommitFromLine(line)
commit := self.extractCommitFromLine(line) matchingCommit := commits[i]
matchingCommit := commits[i] commit.Action = matchingCommit.Action
commit.Action = matchingCommit.Action commit.Status = matchingCommit.Status
commit.Status = matchingCommit.Status hydratedCommits = append(hydratedCommits, commit)
hydratedCommits = append(hydratedCommits, commit) i++
i++
}
return false, nil return false, nil
}) })
if err != nil { if err != nil {
@ -456,7 +454,3 @@ var prettyFormat = fmt.Sprintf(
) )
const NULL_CODE = "%x00" const NULL_CODE = "%x00"
func canExtractCommit(line string) bool {
return line != "" && strings.Split(line, " ")[0] != "gpg:"
}