1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-03-19 21:28:28 +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
cmdObj := self.cmd.New(
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, " "),
prettyFormat,
20,
@ -222,14 +222,12 @@ func (self *CommitLoader) getHydratedRebasingCommits(rebaseMode enums.RebaseMode
hydratedCommits := make([]*models.Commit, 0, len(commits))
i := 0
err = cmdObj.RunAndProcessLines(func(line string) (bool, error) {
if canExtractCommit(line) {
commit := self.extractCommitFromLine(line)
matchingCommit := commits[i]
commit.Action = matchingCommit.Action
commit.Status = matchingCommit.Status
hydratedCommits = append(hydratedCommits, commit)
i++
}
commit := self.extractCommitFromLine(line)
matchingCommit := commits[i]
commit.Action = matchingCommit.Action
commit.Status = matchingCommit.Status
hydratedCommits = append(hydratedCommits, commit)
i++
return false, nil
})
if err != nil {
@ -456,7 +454,3 @@ var prettyFormat = fmt.Sprintf(
)
const NULL_CODE = "%x00"
func canExtractCommit(line string) bool {
return line != "" && strings.Split(line, " ")[0] != "gpg:"
}