{"thread":{"id":"16535","subject":"[PATCH 1/2] bisect: fix \"git bisect skip <commit>\" and add tests cases","startedAt":"2008-12-01T13:39:03Z","lastAt":"2008-12-01T13:39:03Z","messageCount":1,"participants":["Christian Couder"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"96841","messageId":"20081201143903.1e3cbf52.chriscool@tuxfamily.org","threadId":"16535","inReplyTo":null,"subject":"[PATCH 1/2] bisect: fix \"git bisect skip <commit>\" and add tests cases","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2008-12-01T13:39:03Z","receivedAt":"2008-12-01T13:39:03Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"The patch that allows \"git bisect skip\" to be passed a range of\ncommits using the \"<commit1>..<commit2>\" notation is flawed because\nit introduces a regression when it was passed a simple rev or commit.\n\n\"git bisect skip <commit>\" doesn't work any more, because <commit>\nis quoted but not properly unquoted.\n\nThis patch fixes that and add tests cases to better check when it is\npassed commits and range of commits.\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n git-bisect.sh               |    2 +-\n t/t6030-bisect-porcelain.sh |   19 ++++++++++++++++++-\n 2 files changed, 19 insertions(+), 2 deletions(-)\n\n\tSorry I overlooked something in my previous patch (v2).\n\ndiff --git a/git-bisect.sh b/git-bisect.sh\nindex 6706bc1..58d6276 100755\n--- a/git-bisect.sh\n+++ b/git-bisect.sh\n@@ -203,7 +203,7 @@ bisect_skip() {\n \t    esac\n             all=\"$all $revs\"\n         done\n-        bisect_state 'skip' $all\n+        eval bisect_state 'skip' $all\n }\n \n bisect_state() {\ndiff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh\nindex 85fa39c..dd7eac8 100755\n--- a/t/t6030-bisect-porcelain.sh\n+++ b/t/t6030-bisect-porcelain.sh\n@@ -313,8 +313,25 @@ test_expect_success 'bisect run & skip: find first bad' '\n \tgrep \"$HASH6 is first bad commit\" my_bisect_log.txt\n '\n \n-test_expect_success 'bisect starting with a detached HEAD' '\n+test_expect_success 'bisect skip only one range' '\n+\tgit bisect reset &&\n+\tgit bisect start $HASH7 $HASH1 &&\n+\tgit bisect skip $HASH1..$HASH5 &&\n+\ttest \"$HASH6\" = \"$(git rev-parse --verify HEAD)\" &&\n+\ttest_must_fail git bisect bad > my_bisect_log.txt &&\n+\tgrep \"first bad commit could be any of\" my_bisect_log.txt\n+'\n \n+test_expect_success 'bisect skip many ranges' '\n+\tgit bisect start $HASH7 $HASH1 &&\n+\ttest \"$HASH4\" = \"$(git rev-parse --verify HEAD)\" &&\n+\tgit bisect skip $HASH2 $HASH2.. ..$HASH5 &&\n+\ttest \"$HASH6\" = \"$(git rev-parse --verify HEAD)\" &&\n+\ttest_must_fail git bisect bad > my_bisect_log.txt &&\n+\tgrep \"first bad commit could be any of\" my_bisect_log.txt\n+'\n+\n+test_expect_success 'bisect starting with a detached HEAD' '\n \tgit bisect reset &&\n \tgit checkout master^ &&\n \tHEAD=$(git rev-parse --verify HEAD) &&\n-- \n1.6.0.4.837.g71a67\n"}]}