Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit c787a45

Browse files
Michael J Grubergitster
authored andcommitted
git-bisect.txt: clarify that reset quits bisect
"reset" can be easily misunderstood as resetting a bisect session to its start without finishing it. Clarify that it actually quits the bisect session. Reported-by: Andreas Mohr <[email protected]> Signed-off-by: Michael J Gruber <[email protected]> Reviewed-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7e20105 commit c787a45

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Documentation/git-bisect.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Bisect reset
8383
~~~~~~~~~~~~
8484

8585
After a bisect session, to clean up the bisection state and return to
86-
the original HEAD, issue the following command:
86+
the original HEAD (i.e., to quit bisecting), issue the following command:
8787

8888
------------------------------------------------
8989
$ git bisect reset
@@ -284,13 +284,15 @@ EXAMPLES
284284
------------
285285
$ git bisect start HEAD v1.2 -- # HEAD is bad, v1.2 is good
286286
$ git bisect run make # "make" builds the app
287+
$ git bisect reset # quit the bisect session
287288
------------
288289

289290
* Automatically bisect a test failure between origin and HEAD:
290291
+
291292
------------
292293
$ git bisect start HEAD origin -- # HEAD is bad, origin is good
293294
$ git bisect run make test # "make test" builds and tests
295+
$ git bisect reset # quit the bisect session
294296
------------
295297

296298
* Automatically bisect a broken test case:
@@ -302,6 +304,7 @@ make || exit 125 # this skips broken builds
302304
~/check_test_case.sh # does the test case pass?
303305
$ git bisect start HEAD HEAD~10 -- # culprit is among the last 10
304306
$ git bisect run ~/test.sh
307+
$ git bisect reset # quit the bisect session
305308
------------
306309
+
307310
Here we use a "test.sh" custom script. In this script, if "make"
@@ -351,6 +354,7 @@ use `git cherry-pick` instead of `git merge`.)
351354
------------
352355
$ git bisect start HEAD HEAD~10 -- # culprit is among the last 10
353356
$ git bisect run sh -c "make || exit 125; ~/check_test_case.sh"
357+
$ git bisect reset # quit the bisect session
354358
------------
355359
+
356360
This shows that you can do without a run script if you write the test
@@ -368,6 +372,7 @@ $ git bisect run sh -c '
368372
rm -f tmp.$$
369373
test $rc = 0'
370374

375+
$ git bisect reset # quit the bisect session
371376
------------
372377
+
373378
In this case, when 'git bisect run' finishes, bisect/bad will refer to a commit that

0 commit comments

Comments
 (0)