mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-08-06 22:33:07 +02:00
Cleanup: remove the ignoringWarnings hack from GetMergeBase
GetMergeBase is always called with a full ref, so it shouldn't need the ignoringWarnings hack (which is about ignoring warnings coming from ambiguous refs). Also, separate stdout and stderr, which would also have solved the problem. We no longer really need it now, but it's still cleaner.
This commit is contained in:
@ -69,11 +69,11 @@ func (self *MainBranches) GetMergeBase(refName string) string {
|
||||
// very rarely, users must quit and restart lazygit to fix it; the latter is
|
||||
// also not very common, but can totally happen and is not an error.
|
||||
|
||||
output, _ := self.cmd.New(
|
||||
output, _, _ := self.cmd.New(
|
||||
NewGitCmd("merge-base").Arg(refName).Arg(mainBranches...).
|
||||
ToArgv(),
|
||||
).DontLog().RunWithOutput()
|
||||
return ignoringWarnings(output)
|
||||
).DontLog().RunWithOutputs()
|
||||
return strings.TrimSpace(output)
|
||||
}
|
||||
|
||||
func (self *MainBranches) determineMainBranches(configuredMainBranches []string) []string {
|
||||
|
Reference in New Issue
Block a user