bisect: add documentation for --no-checkout option.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jon Seymour committed Aug 4, 2011 at 22:01 UTC 88d78911accc2b6c44732a1b6f6e9540c519d463
1 file changed +31 -1
Documentation/git-bisect.txt
+31 -1
@@ -17,7 +17,7 @@ The command takes various subcommands, and different options depending
17 on the subcommand:
18
19 git bisect help
20 - git bisect start [<bad> [<good>...]] [--] [<paths>...]
20 + git bisect start [--no-checkout] [<bad> [<good>...]] [--] [<paths>...]
21 git bisect bad [<rev>]
22 git bisect good [<rev>...]
23 git bisect skip [(<rev>|<range>)...]
@@ -263,6 +263,17 @@ rewind the tree to the pristine state. Finally the script should exit
263 with the status of the real test to let the "git bisect run" command loop
264 determine the eventual outcome of the bisect session.
265
266 +OPTIONS
267 +-------
268 +--no-checkout::
269 ++
270 +Do not checkout the new working tree at each iteration of the bisection
271 +process. Instead just update a special reference named 'BISECT_HEAD' to make
272 +it point to the commit that should be tested.
273 ++
274 +This option may be useful when the test you would perform in each step
275 +does not require a checked out tree.
276 +
277 EXAMPLES
278 --------
279
@@ -343,6 +354,25 @@ $ git bisect run sh -c "make || exit 125; ~/check_test_case.sh"
354 This shows that you can do without a run script if you write the test
355 on a single line.
356
357 +* Locate a good region of the object graph in a damaged repository
358 ++
359 +------------
360 +$ git bisect start HEAD <known-good-commit> [ <boundary-commit> ... ] --no-checkout
361 +$ git bisect run sh -c '
362 + GOOD=$(git for-each-ref "--format=%(objectname)" refs/bisect/good-*) &&
363 + git rev-list --objects BISECT_HEAD --not $GOOD >tmp.$$ &&
364 + git pack-objects --stdout >/dev/null <tmp.$$
365 + rc=$?
366 + rm -f tmp.$$
367 + test $rc = 0'
368 +
369 +------------
370 ++
371 +In this case, when 'git bisect run' finishes, bisect/bad will refer to a commit that
372 +has at least one parent whose reachable graph is fully traversable in the sense
373 +required by 'git pack objects'.
374 +
375 +
376 SEE ALSO
377 --------
378 link:git-bisect-lk2009.html[Fighting regressions with git bisect],