1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-12-05 23:18:28 +02:00

simplify how we log commands

This commit is contained in:
Jesse Duffield
2022-01-05 11:57:32 +11:00
parent e524e39842
commit 05fa483f48
44 changed files with 291 additions and 233 deletions

View File

@@ -218,7 +218,7 @@ func (self *CommitLoader) getHydratedRebasingCommits(rebaseMode enums.RebaseMode
prettyFormat,
20,
),
)
).DontLog()
hydratedCommits := make([]*models.Commit, 0, len(commits))
i := 0
@@ -384,7 +384,7 @@ func (self *CommitLoader) getMergeBase(refName string) (string, error) {
}
// swallowing error because it's not a big deal; probably because there are no commits yet
output, _ := self.cmd.New(fmt.Sprintf("git merge-base %s %s", self.cmd.Quote(refName), self.cmd.Quote(baseBranch))).RunWithOutput()
output, _ := self.cmd.New(fmt.Sprintf("git merge-base %s %s", self.cmd.Quote(refName), self.cmd.Quote(baseBranch))).DontLog().RunWithOutput()
return ignoringWarnings(output), nil
}
@@ -405,6 +405,7 @@ func (self *CommitLoader) getFirstPushedCommit(refName string) (string, error) {
New(
fmt.Sprintf("git merge-base %s %s@{u}", self.cmd.Quote(refName), self.cmd.Quote(refName)),
).
DontLog().
RunWithOutput()
if err != nil {
return "", err
@@ -444,7 +445,7 @@ func (self *CommitLoader) getLogCmd(opts GetCommitsOptions) oscommands.ICmdObj {
20,
filterFlag,
),
)
).DontLog()
}
var prettyFormat = fmt.Sprintf(