{"thread":{"id":"18612","subject":"[PATCH 4/4] t6030: test bisecting with paths","startedAt":"2009-03-29T09:45:01Z","lastAt":"2009-03-29T09:45:01Z","messageCount":1,"participants":["Christian Couder"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"109758","messageId":"20090329114501.d6dca210.chriscool@tuxfamily.org","threadId":"18612","inReplyTo":null,"subject":"[PATCH 4/4] t6030: test bisecting with paths","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2009-03-29T09:45:01Z","receivedAt":"2009-03-29T09:45:01Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"This patch adds some tests to check that \"git bisect\" works fine when\npassing paths to \"git bisect start\" to reduce the number of\nbisection steps.\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n t/t6030-bisect-porcelain.sh |   60 +++++++++++++++++++++++++++++++++++++++++++\n 1 files changed, 60 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh\nindex 052a6c9..54b7ea6 100755\n--- a/t/t6030-bisect-porcelain.sh\n+++ b/t/t6030-bisect-porcelain.sh\n@@ -506,6 +506,66 @@ test_expect_success 'optimized merge base checks' '\n \tunset GIT_TRACE\n '\n \n+# This creates another side branch called \"parallel\" with some files\n+# in some directories, to test bisecting with paths.\n+#\n+# We should have the following:\n+#\n+#    P1-P2-P3-P4-P5-P6-P7\n+#   /        /        /\n+# H1-H2-H3-H4-H5-H6-H7\n+#            \\  \\     \\\n+#             S5-A     \\\n+#              \\        \\\n+#               S6-S7----B\n+#\n+test_expect_success '\"parallel\" side branch creation' '\n+\tgit bisect reset &&\n+\tgit checkout -b parallel $HASH1 &&\n+\tmkdir dir1 dir2 &&\n+\tadd_line_into_file \"1(para): line 1 on parallel branch\" dir1/file1 &&\n+\tPARA_HASH1=$(git rev-parse --verify HEAD) &&\n+\tadd_line_into_file \"2(para): line 2 on parallel branch\" dir2/file2 &&\n+\tPARA_HASH2=$(git rev-parse --verify HEAD) &&\n+\tadd_line_into_file \"3(para): line 3 on parallel branch\" dir2/file3 &&\n+\tPARA_HASH3=$(git rev-parse --verify HEAD)\n+\tgit merge -m \"merge HASH4 and PARA_HASH3\" \"$HASH4\" &&\n+\tPARA_HASH4=$(git rev-parse --verify HEAD)\n+\tadd_line_into_file \"5(para): add line on parallel branch\" dir1/file1 &&\n+\tPARA_HASH5=$(git rev-parse --verify HEAD)\n+\tadd_line_into_file \"6(para): add line on parallel branch\" dir2/file2 &&\n+\tPARA_HASH6=$(git rev-parse --verify HEAD)\n+\tgit merge -m \"merge HASH7 and PARA_HASH6\" \"$HASH7\" &&\n+\tPARA_HASH7=$(git rev-parse --verify HEAD)\n+'\n+\n+test_expect_success 'restricting bisection on one dir' '\n+\tgit bisect reset &&\n+\tgit bisect start HEAD $HASH1 -- dir1 &&\n+\tpara1=$(git rev-parse --verify HEAD) &&\n+\ttest \"$para1\" = \"$PARA_HASH1\" &&\n+\tgit bisect bad > my_bisect_log.txt &&\n+\tgrep \"$PARA_HASH1 is first bad commit\" my_bisect_log.txt\n+'\n+\n+test_expect_success 'restricting bisection on one dir and a file' '\n+\tgit bisect reset &&\n+\tgit bisect start HEAD $HASH1 -- dir1 hello &&\n+\tpara4=$(git rev-parse --verify HEAD) &&\n+\ttest \"$para4\" = \"$PARA_HASH4\" &&\n+\tgit bisect bad &&\n+\thash3=$(git rev-parse --verify HEAD) &&\n+\ttest \"$hash3\" = \"$HASH3\" &&\n+\tgit bisect good &&\n+\thash4=$(git rev-parse --verify HEAD) &&\n+\ttest \"$hash4\" = \"$HASH4\" &&\n+\tgit bisect good &&\n+\tpara1=$(git rev-parse --verify HEAD) &&\n+\ttest \"$para1\" = \"$PARA_HASH1\" &&\n+\tgit bisect good > my_bisect_log.txt &&\n+\tgrep \"$PARA_HASH4 is first bad commit\" my_bisect_log.txt\n+'\n+\n #\n #\n test_done\n-- \n1.6.2.1.404.gb0085.dirty\n"}]}