Closed welchn closed 7 years ago
@welchn Close - Defining both 'bad' and good' gives the parameters. This is the range in which we know something is broken. Then, you're right - it halves the commits, runs the tests, and based on that information, halves one of the halves, etc. Does that make sense?
Mostly...If you are manually typing "bisect" like in his first example, how do you know if you should type "git bisect bad" or "git bisect good"? How do you know when you are done?
how do you know if you should type "git bisect bad" or "git bisect good"?
@welchn AH, I understand how. So when it pauses and waits for you to say git bisect good
or git bisect bad
, you would run a test. For us, the test was basic: ls
. But, the tests can be as complex a the tests you would normally be running.
In reality, you would know something is broken before running git bisect, so you might use the same test that found the error during the bisect process.
How do you know when you are done?
Git will tell you when you're done - it will list one commit that is responsible based on the input you'd given it along the way.
Does this clarify?
Perfect, thanks!
With each bisect, is he "halving" the commits toward the end he specifies? So "git bisect bad" looks at the half-way object between current pointer and "bad"?