diff options
Diffstat (limited to 'pkg/commands')
-rw-r--r-- | pkg/commands/git_commands/bisect.go | 7 | ||||
-rw-r--r-- | pkg/commands/git_commands/bisect_info.go | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/pkg/commands/git_commands/bisect.go b/pkg/commands/git_commands/bisect.go index b032afc45..b09a50bf5 100644 --- a/pkg/commands/git_commands/bisect.go +++ b/pkg/commands/git_commands/bisect.go @@ -163,9 +163,12 @@ func (self *BisectCommands) IsDone() (bool, []string, error) { return done, candidates, nil } -func (self *BisectCommands) ReachableFromStart(ref string, startRef string) bool { +// tells us whether the 'start' ref that we'll be sent back to after we're done +// bisecting is actually a descendant of our current bisect commit. If it's not, we need to +// render the commits from the bad commit. +func (self *BisectCommands) ReachableFromStart(bisectInfo *BisectInfo) bool { err := self.cmd.New( - fmt.Sprintf("git merge-base --is-ancestor %s %s", startRef, ref), + fmt.Sprintf("git merge-base --is-ancestor %s %s", bisectInfo.GetNewSha(), bisectInfo.GetStartSha()), ).DontLog().Run() return err == nil diff --git a/pkg/commands/git_commands/bisect_info.go b/pkg/commands/git_commands/bisect_info.go index 9b812a17f..5b3b1f028 100644 --- a/pkg/commands/git_commands/bisect_info.go +++ b/pkg/commands/git_commands/bisect_info.go @@ -59,7 +59,7 @@ func (self *BisectInfo) GetCurrentSha() string { return self.current } -func (self *BisectInfo) StartSha() string { +func (self *BisectInfo) GetStartSha() string { return self.start } |