Skip to content

Commit

Permalink
Documentation - More examples for git bisect
Browse files Browse the repository at this point in the history
Including passing parameters to the programs, and running more
complicated checks without requiring a seperate shell script.

Signed-off-by: John Tapsell <johnflux@gmail.com>
Acked-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
John Tapsell authored and Junio C Hamano committed Mar 5, 2009
1 parent a84bde9 commit fad5c96
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion Documentation/git-bisect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ If you have a script that can tell if the current source code is good
or bad, you can automatically bisect using:

------------
$ git bisect run my_script
$ git bisect run my_script arguments
------------

Note that the "run" script (`my_script` in the above example) should
Expand Down Expand Up @@ -252,6 +252,13 @@ $ git bisect start HEAD v1.2 -- # HEAD is bad, v1.2 is good
$ git bisect run make # "make" builds the app
------------

* Automatically bisect a test failure between origin and HEAD:
+
------------
$ git bisect start HEAD origin -- # HEAD is bad, origin is good
$ git bisect run make test # "make test" builds and tests
------------

* Automatically bisect a broken test suite:
+
------------
Expand Down Expand Up @@ -291,6 +298,15 @@ It's safer if both "test.sh" and "check_test_case.sh" scripts are
outside the repo to prevent interactions between the bisect, make and
test processes and the scripts.

* Automatically bisect a broken test suite:
+
------------
$ git bisect start HEAD HEAD~10 -- # culprit is among the last 10
$ git bisect run sh -c "make || exit 125; ~/check_test_case.sh"
------------
+
Does the same as the previous example, but on a single line.

Author
------
Written by Linus Torvalds <torvalds@osdl.org>
Expand Down

0 comments on commit fad5c96

Please sign in to comment.