git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v13 7/8] bisect: add documentation for --no-checkout option.

From
Jon Seymour <jon.seymour@gmail.com>
Date
Aug 2, 2011, 11:29 UTC
Message-ID
<1312284545-2426-8-git-send-email-jon.seymour@gmail.com>
In-Reply-To
<1312284545-2426-1-git-send-email-jon.seymour@gmail.com>
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
---
 Documentation/git-bisect.txt |   32 +++++++++++++++++++++++++++++++-
 1 files changed, 31 insertions(+), 1 deletions(-)
diff --git a/Documentation/git-bisect.txt b/Documentation/git-bisect.txt
index ab60a18..2014894 100644
--- a/Documentation/git-bisect.txt
+++ b/Documentation/git-bisect.txt
@@ -17,7 +17,7 @@ The command takes various subcommands, and different options depending
 on the subcommand:
 
  git bisect help
- git bisect start [<bad> [<good>...]] [--] [<paths>...]
+ git bisect start [--no-checkout] [<bad> [<good>...]] [--] [<paths>...]
  git bisect bad [<rev>]
  git bisect good [<rev>...]
  git bisect skip [(<rev>|<range>)...]
@@ -263,6 +263,17 @@ rewind the tree to the pristine state.  Finally the script should exit
 with the status of the real test to let the "git bisect run" command loop
 determine the eventual outcome of the bisect session.
 
+OPTIONS
+-------
+--no-checkout::
++
+This option is used to specify that 'git bisect' should not modify the working
+tree or index on each iteration of the bisection process but should
+update HEAD instead.
++
+This option is useful in circumstances in which checkout is either not
+possible (because of a damaged respository) or is otherwise not required.
+
 EXAMPLES
 --------
 
@@ -343,6 +354,25 @@ $ git bisect run sh -c "make || exit 125; ~/check_test_case.sh"
 This shows that you can do without a run script if you write the test
 on a single line.
 
+* Locate a good region of the object graph in a damaged repository
++
+------------
+$ git bisect start HEAD <known-good-commit> [ <boundary-commit> ... ] --no-checkout
+$ git bisect run eval '
+rc=1;
+if git rev-list --objects HEAD >tmp.$$; then
+   git pack-objects --stdout >/dev/null < tmp.$$ && rc=0;
+fi;
+rm tmp.$$;
+test $rc -eq 0;'
+
+------------
++
+In this case, when 'git bisect run' finishes, bisect/bad will refer to a commit that
+has at least one parent whose reachable graph is fully traversable in the sense
+required by 'git pack objects'.
+
+
 SEE ALSO
 --------
 link:git-bisect-lk2009.html[Fighting regressions with git bisect],
-- 
1.7.6.353.g3461
Previous: Jon SeymourNext: Jon Seymour
Message 22 of 23 in “bisect: Add support for --no-checkout option”
  1. 0/8 bisect: Add support for --no-checkout optionJon Seymour, Aug 2, 2011
  2. 1/8 bisect: move argument parsing before state modification.Jon Seymour, Aug 2, 2011
  3. 2/8 bisect: use && to connect statements that are deferred with eval.Jon Seymour, Aug 2, 2011
  4. 3/8 bisect: add tests to document expected behaviour in presence of broken trees.Jon Seymour, Aug 2, 2011
  5. 4/8 bisect: introduce support for --no-checkout option.Jon Seymour, Aug 2, 2011
  6. Christian CouderAug 2, 2011
  7. Jon SeymourAug 2, 2011
  8. Junio C HamanoAug 2, 2011
  9. Jon SeymourAug 2, 2011
  10. Junio C HamanoAug 2, 2011
  11. Jon SeymourAug 2, 2011
  12. 5/8 bisect: introduce --no-checkout support into porcelain.Jon Seymour, Aug 2, 2011
  13. Christian CouderAug 2, 2011
  14. Jon SeymourAug 2, 2011
  15. Christian CouderAug 3, 2011
  16. Jon SeymourAug 3, 2011
  17. Jon SeymourAug 3, 2011
  18. Christian CouderAug 3, 2011
  19. Jon SeymourAug 3, 2011
  20. Christian CouderAug 3, 2011
  21. 6/8 bisect: add tests for the --no-checkout option.Jon Seymour, Aug 2, 2011
  22. 7/8 bisect: add documentation for --no-checkout option.Jon Seymour, Aug 2, 2011
  23. 8/8 bisect: change bisect function to update BISECT_HEAD, rather than HEAD.Jon Seymour, Aug 2, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.