Skip to content

Instantly share code, notes, and snippets.

@illustris
Created May 3, 2018 13:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save illustris/c843a9fe19e16dc4ac46f8525c66f4e5 to your computer and use it in GitHub Desktop.
Save illustris/c843a9fe19e16dc4ac46f8525c66f4e5 to your computer and use it in GitHub Desktop.
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