the "bisect" subcommand of Git or the "bisect" module of Python
Questions tagged [bisect]
105 questions
128
votes
2 answers
How do I stop git bisect?
I tried git bisect a while ago and it helped me well, but apparently I didn't stop it. When I do git status I still get:
You are currently bisecting.
(use "git bisect reset" to get back to the original branch)
I don't really want to reset to…

kodu
- 2,176
- 3
- 17
- 22
113
votes
5 answers
How could I use git bisect to find the first GOOD commit?
I have the following problem:
the version at master works fine
the version of the last tag before master (say last) has a bug
a colleague needs a patch for his last revision for that certain bug
Okay. Let's ask our friend git bisect for the…

eckes
- 64,417
- 29
- 168
- 201
52
votes
6 answers
How to use bisect.insort_left with a key?
Doc's are lacking an example...How do you use bisect.insort_left)_ based on a key?
Trying to insert based on key.
bisect.insort_left(data, ('brown', 7))
puts insert at data[0].
From docs...
bisect.insort_left(a, x, lo=0, hi=len(a))
Insert x…

Merlin
- 24,552
- 41
- 131
- 206
44
votes
1 answer
Run two commands during git bisect run
I would essentially like to do git bisect run 'bundle && bundle exec cucumber'.
I want to do this on the commandline - I don't want to write a shell script.

Mark Wilden
- 2,080
- 1
- 15
- 15
26
votes
4 answers
What is Mercurial bisect good for?
I've been reading about hg bisect and its interesting to be able to know which revision introduced a bug, but I'd like to know what people use this information for. The only thing I can think of is trying to narrow down which dates might need a data…

Asa Ayers
- 4,854
- 6
- 40
- 57
21
votes
4 answers
Finding first appearance of text in Mercurial repository
I have a Mercurial repository with ~800 changesets and I need to find the first changeset where the word Example appeared. The word appears inside a .php file and not on a commit comment etc.
What is the quickest/easiest way to do that?

Aviram
- 3,017
- 4
- 29
- 43
17
votes
7 answers
Java's equivalent to bisect in python
Is there an equivalent in Java for Python's bisect module? With Python's bisect you can do array bisection with directions. For instance bisect.bisect_left does:
Locate the proper insertion point for item in list to maintain sorted order. The…

systemsfault
- 15,207
- 12
- 59
- 66
13
votes
2 answers
What is the complexity of bisect algorithm?
I wrote code to understand which of them is faster when it comes to search an element in a list. It turns out to be bisect. What I do not understand is what is complexity of bisect algorithm and does it use Van Emde Boas tree?
#python inbuilt list…

codersofthedark
- 9,183
- 8
- 45
- 70
12
votes
4 answers
How can you get the current state (history of good/bad revisions) of a bisect from mercurial
When doing an hg bisect in eclipse, I like that I can see all of the bads and goods I've marked in the past.
Is there a way to get that information at the command line?

Joshua Goldberg
- 5,059
- 2
- 34
- 39
12
votes
2 answers
Is it possible to use git bisect on git tags
I love using git bisect especially for solving regression bugs. However, I realized that it can also be too granular: it points out the exact commit message, what if I simply would like to know in what release did a certain bug happen (by a release…

abbood
- 23,101
- 16
- 132
- 246
10
votes
2 answers
What git commit practice is better?
I truly believe that to have one commit on one issue is a good practice. I'm sure I read it somewhere in an article like “Best practices”.
As such, my workflow has been the following:
For a new issue, I create a new local branch with git checkout…

Viacheslav Kondratiuk
- 8,493
- 9
- 49
- 81
9
votes
2 answers
bisect.insort complexity not as expected
trying to find the most optimal data structure in python3 for a frotier problem i have to develop have just realised that the complexity of using the module bisect to make a real time ordered insert is not O(nlog n) as it should be and grows…

jupcan
- 436
- 3
- 7
- 17
8
votes
1 answer
python bisect.insort(list, value)
does this python module computes an ordered insert into a data structure or it inserts and then sort? been struggling with this kind of thing in python since developing an algorithm in which I have to keep in mind memmory issues thus need a way to…

jupcan
- 436
- 3
- 7
- 17
8
votes
2 answers
How to resume a git bisect
Suppose that I'm going through a git bisect, and after running a git bisect bad command, my git bisect gets interrupted like so:
$ git bisect bad
Bisecting: 0 revisions left to test after this (roughly 1 step)
error: Your local changes to the…

abbood
- 23,101
- 16
- 132
- 246
8
votes
3 answers
Find where f(x) changes in a list, with bisection (in Python)
Reasoning: I'm trying to implement, in Python, something similar to git bisect, but with basically a list of directories.
I have a (long) list of version numbers like this:
['1.0', '1.14', '2.3', '3.1', '4']
I have a function works() which takes a…

Daniel
- 2,032
- 5
- 21
- 27