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

only show commits from start ref if bad commit is reachable from there

This commit is contained in:
Jesse Duffield
2022-01-26 15:17:11 +11:00
parent dc765c4166
commit ca7cfc3232
3 changed files with 26 additions and 9 deletions

View File

@ -162,3 +162,11 @@ func (self *BisectCommands) IsDone() (bool, []string, error) {
return done, candidates, nil
}
func (self *BisectCommands) ReachableFromStart(ref string, startRef string) bool {
err := self.cmd.New(
fmt.Sprintf("git merge-base --is-ancestor %s %s", startRef, ref),
).Run()
return err == nil
}