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

[PATCH 6/9] bisect: enable --ignore-checkout-failure in the porcelain.

From
Jon Seymour <jon.seymour@gmail.com>
Date
Jul 24, 2011, 05:57 UTC
Message-ID
<1311487074-25070-7-git-send-email-jon.seymour@gmail.com>
In-Reply-To
<1311487074-25070-1-git-send-email-jon.seymour@gmail.com>
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
---
 git-bisect.sh |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/git-bisect.sh b/git-bisect.sh
index ecbd5bf..f3913ba 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -3,7 +3,7 @@
 USAGE='[help|start|bad|good|skip|next|reset|visualize|replay|log|run]'
 LONG_USAGE='git bisect help
         print this long help message.
-git bisect start [<bad> [<good>...]] [--] [<pathspec>...]
+git bisect start [--ignore-checkout-failure] [<bad> [<good>...]] [--] [<pathspec>...]
         reset bisect state and start bisection.
 git bisect bad [<rev>]
         mark <rev> a known-bad revision.
@@ -116,6 +116,11 @@ bisect_start() {
 		shift
 		break
 		;;
+	    --ignore-checkout-failure)
+		IGNORE_CHECKOUT_FAILURE=$arg
+		echo "$arg" > $GIT_DIR/BISECT_IGNORE_CHECKOUT_FAILURE
+		shift
+		;;
 	    *)
 		rev=$(git rev-parse -q --verify "$arg^{commit}") || {
 		    test $has_double_dash -eq 1 &&
@@ -293,7 +298,7 @@ bisect_next() {
 	bisect_next_check good
 
 	# Perform all bisection computation, display and checkout
-	git bisect--helper --next-all
+	git bisect--helper --next-all ${IGNORE_CHECKOUT_FAILURE}
 	res=$?
 
         # Check if we should exit because bisection is finished
@@ -379,6 +384,7 @@ bisect_clean_state() {
 	rm -f "$GIT_DIR/BISECT_LOG" &&
 	rm -f "$GIT_DIR/BISECT_NAMES" &&
 	rm -f "$GIT_DIR/BISECT_RUN" &&
+	rm -f "$GIT_DIR/BISECT_IGNORE_CHECKOUT_FAILURE" &&
 	# Cleanup head-name if it got left by an old version of git-bisect
 	rm -f "$GIT_DIR/head-name" &&
 
-- 
1.7.6.347.g96e0b.dirty
Previous: Jon SeymourNext: Jon Seymour
Message 7 of 21 in “[RFC 0/9] bisect: allow git bisect to be used with repos containing damaged trees.”
  1. Jon SeymourJul 24, 2011
  2. 1/9 bisect: add tests to document expected behaviour in presence of broken trees.Jon Seymour, Jul 24, 2011
  3. 2/9 bisect: introduce a --ignore-checkout-failure option to bisect--helper.Jon Seymour, Jul 24, 2011
  4. 3/9 bisect: implement support for --ignore-checkout-failure optionJon Seymour, Jul 24, 2011
  5. 4/9 bisect: introduce a helper function to tolerate checkout failures.Jon Seymour, Jul 24, 2011
  6. 5/9 bisect: replace existing calls to git checkout with bisect_checkout_with_ignoreJon Seymour, Jul 24, 2011
  7. 6/9 bisect: enable --ignore-checkout-failure in the porcelain.Jon Seymour, Jul 24, 2011
  8. 7/9 bisect: better diagnostics, in case of mis-typed option.Jon Seymour, Jul 24, 2011
  9. 8/9 bisect: add tests for --ignore-checkout-failure option.Jon Seymour, Jul 24, 2011
  10. 9/9 bisect: add documentation for --ignore-checkout-failure option.Jon Seymour, Jul 24, 2011
  11. Johannes SixtJul 24, 2011
  12. Jon SeymourJul 24, 2011
  13. Junio C HamanoJul 24, 2011
  14. Jon SeymourJul 25, 2011
  15. Junio C HamanoJul 25, 2011
  16. Jon SeymourJul 25, 2011
  17. Johannes SixtJul 25, 2011
  18. Jon SeymourJul 25, 2011
  19. Jakub NarebskiJul 26, 2011
  20. Jon SeymourJul 26, 2011
  21. Jon SeymourJul 26, 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.