1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-12-07 23:22:40 +02:00

perf: improve loading speed of commits and reflog when log.showSignature=true

This commit is contained in:
Ryooooooga
2022-05-04 19:41:37 +09:00
parent 8c04118bb1
commit f789e21377
4 changed files with 14 additions and 16 deletions

View File

@@ -32,7 +32,7 @@ func (self *ReflogCommitLoader) GetReflogCommits(lastReflogCommit *models.Commit
filterPathArg = fmt.Sprintf(" --follow -- %s", self.cmd.Quote(filterPath))
}
cmdObj := self.cmd.New(fmt.Sprintf(`git log -g --abbrev=40 --format="%s"%s`, "%h%x00%ct%x00%gs%x00%p", filterPathArg)).DontLog()
cmdObj := self.cmd.New(fmt.Sprintf(`git -c log.showSignature=false log -g --abbrev=40 --format="%s"%s`, "%h%x00%ct%x00%gs%x00%p", filterPathArg)).DontLog()
onlyObtainedNewReflogCommits := false
err := cmdObj.RunAndProcessLines(func(line string) (bool, error) {
fields := strings.SplitN(line, "\x00", 4)