Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A short script I wrote to manually bisect a list of commits. Git bisect doesn;t play well with repo or submodules
def binsearch(commits):
if len(commits) == 1:
print commits[0]
else:
print commits[(len(commits)-1)/2]
answer = ""
while answer not in ["y", "n"]:
answer = raw_input("Working? [Y/N] ").lower()
if answer == "n":
binsearch(commits[(len(commits)+1)/2 : ])
else:
binsearch(commits[ : (len(commits)-1)/2])
with open("qemu.binsearch") as f:
content = f.readlines()
content = [x.strip() for x in content]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.