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

[PATCH 8/9] bisect: add tests for --ignore-checkout-failure option.

From
Jon Seymour <jon.seymour@gmail.com>
Date
Jul 24, 2011, 05:57 UTC
Message-ID
<1311487074-25070-9-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>
---
 t/t6030-bisect-porcelain.sh |   69 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 69 insertions(+), 0 deletions(-)
diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh
index 2c14fb0..32fb434 100755
--- a/t/t6030-bisect-porcelain.sh
+++ b/t/t6030-bisect-porcelain.sh
@@ -624,4 +624,73 @@ test_expect_success 'bisect fails if tree is broken on trial commit' '
         test_cmp expected.missing-tree.default error.txt
 '
 
+test_expect_success 'bisect: --ignore-checkout-failure - start commit bad' '
+        git bisect reset &&
+        git bisect start $BROKEN_HASH7 $HASH4 --ignore-checkout-failure 2>error.txt
+        test_cmp expected.missing-tree.ignored error.txt &&
+        broken6=$(git rev-parse HEAD) &&
+        test "$broken6" = "$BROKEN_HASH6" &&
+        git bisect reset
+'
+
+test_expect_success 'bisect: --ignore-checkout-failure - trial commit bad' '
+        git bisect reset &&
+        git bisect start broken $HASH4 --ignore-checkout-failure 2>error.txt
+        test_cmp expected.missing-tree.ignored error.txt &&
+        broken6=$(git rev-parse HEAD) &&
+        test "$broken6" = "$BROKEN_HASH6" &&
+        git bisect reset
+'
+
+test_expect_success 'bisect: --ignore-checkout-failure - target before breakage' '
+        git bisect reset &&
+        git bisect start broken $HASH4 --ignore-checkout-failure 2>error.txt
+        test_cmp expected.missing-tree.ignored error.txt &&
+        broken6=$(git rev-parse HEAD) &&
+        test "$broken6" = "$BROKEN_HASH6" &&
+        git bisect bad HEAD &&
+        broken5=$(git rev-parse HEAD) &&
+        test "$broken5" = "$BROKEN_HASH5" &&
+        git bisect bad HEAD > my_bisect_log.txt &&
+        broken4=$(git rev-parse HEAD) &&
+        test "$broken4" = "$HASH4" &&
+        echo "$BROKEN_HASH5 is the first bad commit" > expected.txt &&
+        test_cmp expected.txt my_bisect_log.txt
+        git bisect reset
+'
+
+test_expect_success 'bisect: --ignore-checkout-failure - target in breakage' '
+        git bisect reset &&
+        git bisect start broken $HASH4 --ignore-checkout-failure 2>error.txt
+        test_cmp expected.missing-tree.ignored error.txt &&
+        broken6=$(git rev-parse HEAD) &&
+        test "$broken6" = "$BROKEN_HASH6" &&
+        git bisect bad HEAD &&
+        broken5=$(git rev-parse HEAD) &&
+        test "$broken5" = "$BROKEN_HASH5" &&
+        git bisect good HEAD > my_bisect_log.txt &&
+        broken6=$(git rev-parse HEAD) &&
+        test "$broken6" = "$BROKEN_HASH6" &&
+        echo "$BROKEN_HASH6 is the first bad commit" > expected.txt &&
+        test_cmp expected.txt my_bisect_log.txt
+        git bisect reset
+'
+
+test_expect_success 'bisect: --ignore-checkout-failure - target after breakage' '
+        git bisect reset &&
+        git bisect start broken $HASH4 --ignore-checkout-failure 2>error.txt
+        test_cmp expected.missing-tree.ignored error.txt &&
+        broken6=$(git rev-parse HEAD) &&
+        test "$broken6" = "$BROKEN_HASH6" &&
+        git bisect good HEAD &&
+        broken8=$(git rev-parse HEAD) &&
+        test "$broken8" = "$BROKEN_HASH8" &&
+        git bisect good HEAD > my_bisect_log.txt &&
+        broken9=$(git rev-parse HEAD) &&
+        test "$broken9" = "$BROKEN_HASH9" &&
+        echo "$BROKEN_HASH9 is the first bad commit" > expected.txt &&
+        test_cmp expected.txt my_bisect_log.txt
+        git bisect reset
+'
+
 test_done
-- 
1.7.6.347.g96e0b.dirty
Previous: Jon SeymourNext: Jon Seymour
Message 9 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.