Documentation - More examples for git bisect
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>
John Tapsell committed
Mar 5, 2009 at 12:36 UTC
fad5c96756fe9524fcb4e6ab7468368c2fb20fa0
1 file changed
+17
-1
Documentation/git-bisect.txt
+17
-1
@@ -212,7 +212,7 @@ If you have a script that can tell if the current source code is good
212
or bad, you can automatically bisect using:
213
214
------------
215
-$ git bisect run my_script
215
+$ git bisect run my_script arguments
216
------------
217
218
Note that the "run" script (`my_script` in the above example) should
@@ -252,6 +252,13 @@ $ git bisect start HEAD v1.2 -- # HEAD is bad, v1.2 is good
252
$ git bisect run make # "make" builds the app
253
------------
254
255
+* Automatically bisect a test failure between origin and HEAD:
256
++
257
+------------
258
+$ git bisect start HEAD origin -- # HEAD is bad, origin is good
259
+$ git bisect run make test # "make test" builds and tests
260
+------------
261
+
262
* Automatically bisect a broken test suite:
263
+
264
------------
@@ -291,6 +298,15 @@ It's safer if both "test.sh" and "check_test_case.sh" scripts are
298
outside the repo to prevent interactions between the bisect, make and
299
test processes and the scripts.
300
301
+* Automatically bisect a broken test suite:
302
++
303
+------------
304
+$ git bisect start HEAD HEAD~10 -- # culprit is among the last 10
305
+$ git bisect run sh -c "make || exit 125; ~/check_test_case.sh"
306
+------------
307
++
308
+Does the same as the previous example, but on a single line.
309
+
310
Author
311
------
312
Written by Linus Torvalds <torvalds@osdl.org>