Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions lib/bummr/bisecter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ class Bisecter
def bisect
puts "Bad commits found! Bisecting...".color(:red)

toplevel_path = `git rev-parse --show-toplevel`.chomp

system("bundle")
system("git bisect start")
system("git bisect bad")
system("git bisect good #{BASE_BRANCH}")
system("git -C #{toplevel_path} bisect start")
system("git -C #{toplevel_path} bisect bad")
system("git -C #{toplevel_path} bisect good #{BASE_BRANCH}")

Open3.popen2e("git bisect run #{TEST_COMMAND}") do |_std_in, std_out_err|
Open3.popen2e("git -C #{toplevel_path} bisect run #{TEST_COMMAND}") do |_std_in, std_out_err|
while line = std_out_err.gets
puts line

Expand Down