Skip to content

Commit f97556f

Browse files
committed
Merge branch 'sb/bisect' into pu
The internal algorithm used in "git bisect" to find the next commit to check has been optimized greatly. * sb/bisect: (22 commits) SQUASH??? bisect: get back halfway shortcut bisect: compute best bisection in compute_relevant_weights() bisect: use a bottom-up traversal to find relevant weights bisect: prepare for different algorithms based on find_all bisect: rename count_distance() to compute_weight() bisect: make total number of commits global bisect: introduce distance_direction() bisect: extract get_distance() function from code duplication bisect: use commit instead of commit list as arguments when appropriate bisect: replace clear_distance() by unique markers bisect: use struct node_data array instead of int array bisect: get rid of recursion in count_distance() bisect: make algorithm behavior independent of DEBUG_BISECT bisect: make bisect compile if DEBUG_BISECT is set bisect: plug the biggest memory leak bisect: add test for the bisect algorithm t6030: generalize test to not rely on current implementation t: use test_cmp_rev() where appropriate t/test-lib-functions.sh: generalize test_cmp_rev ...
2 parents 260da11 + 6dd361d commit f97556f

34 files changed

+830
-506
lines changed

Documentation/git-bisect.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ on the subcommand:
2727
git bisect replay <logfile>
2828
git bisect log
2929
git bisect run <cmd>...
30+
git bisect next
3031
git bisect help
3132

3233
This command uses a binary search algorithm to find which commit in
@@ -66,6 +67,15 @@ checks it out, and outputs something similar to the following:
6667
Bisecting: 675 revisions left to test after this (roughly 10 steps)
6768
------------------------------------------------
6869

70+
Note that in cases you do not know a good commit,
71+
you can also start with:
72+
73+
------------------------------------------------
74+
$ git bisect start
75+
$ git bisect bad # current version is bad
76+
$ git bisect next # check out another commit
77+
------------------------------------------------
78+
6979
You should now compile the checked-out version and test it. If that
7080
version works correctly, type
7181

@@ -353,6 +363,20 @@ rewind the tree to the pristine state. Finally the script should exit
353363
with the status of the real test to let the `git bisect run` command loop
354364
determine the eventual outcome of the bisect session.
355365

366+
Bisect next
367+
~~~~~~~~~~~
368+
369+
In case you have marked a commit as bad but you do not know a good
370+
commit, you do not have to crawl through the commit history yourself to
371+
find a good commit. Simply issue the command:
372+
373+
------------
374+
$ git bisect next
375+
------------
376+
377+
In general, the command computes the next commit for the bisection and
378+
checks it out.
379+
356380
OPTIONS
357381
-------
358382
--no-checkout::

0 commit comments

Comments
 (0)