{"thread":{"id":"42302","subject":"[PATCH] t6030: explicitly test for bisection cleanup","startedAt":"2016-05-13T10:14:29Z","lastAt":"2016-05-27T19:22:21Z","messageCount":4,"participants":["Pranit Bauva","Christian Couder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"286442","messageId":"1463134469-26071-1-git-send-email-pranit.bauva@gmail.com","threadId":"42302","inReplyTo":null,"subject":"[PATCH] t6030: explicitly test for bisection cleanup","fromName":"Pranit Bauva","fromEmail":"pranit.bauva@gmail.com","sentAt":"2016-05-13T10:14:29Z","receivedAt":"2016-05-13T10:14:29Z","isPatch":true,"sender":{"key":"pranit.bauva@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2959938?v=4"},"body":"This is not an improvement in the test coverage but it helps in making\nit explicit as to know what exactly is the error as other tests are\nfocussed on testing other things but they do indirectly test for this.\n\nMentored-by: Lars Schneider <larsxschneider@gmail.com>\nMentored-by: Christian Couder <chriscool@tuxfamily.org>\nSigned-off-by: Pranit Bauva <pranit.bauva@gmail.com>\n\n---\nI faced this problem while converting `bisect_clean_state` and the tests\nwhere showing breakages but it wasn't clear as to where exactly are they\nbreaking. This will patch  will help in that. Also I tested the test\ncoverage of the test suite before this patch and it covers this (I did\nthis by purposely changing names of files in git-bisect.sh and running\nthe test suite).\n\nSigned-off-by: Pranit Bauva <pranit.bauva@gmail.com>\n---\n t/t6030-bisect-porcelain.sh | 17 +++++++++++++++++\n 1 file changed, 17 insertions(+)\n\ndiff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh\nindex e74662b..1fb5ad9 100755\n--- a/t/t6030-bisect-porcelain.sh\n+++ b/t/t6030-bisect-porcelain.sh\n@@ -894,4 +894,21 @@ test_expect_success 'bisect start takes options and revs in any order' '\n \ttest_cmp expected actual\n '\n \n+test_expect_success 'git bisect reset cleans bisection state properly' '\n+\tgit bisect reset &&\n+\tgit bisect start &&\n+\tgit bisect good $HASH1 &&\n+\tgit bisect bad $HASH4 &&\n+\tgit bisect reset &&\n+\ttest -z \"$(git for-each-ref \"refs/bisect/*\")\" &&\n+\t! test -s \"$GIT_DIR/BISECT_EXPECTED_REV\" &&\n+\t! test -s \"$GIT_DIR/BISECT_ANCESTORS_OK\" &&\n+\t! test -s \"$GIT_DIR/BISECT_LOG\" &&\n+\t! test -s \"$GIT_DIR/BISECT_RUN\" &&\n+\t! test -s \"$GIT_DIR/BISECT_TERMS\" &&\n+\t! test -s \"$GIT_DIR/head-name\" &&\n+\t! test -s \"$GIT_DIR/BISECT_HEAD\" &&\n+\t! test -s \"$GIT_DIR/BISECT_START\"\n+'\n+\n test_done\n-- \n2.8.2\n"},{"id":"287700","messageId":"CAFZEwPMyts8msEgdHOiPfC-_HEXp8SJ7-8FQScr-af=5tSxq7w@mail.gmail.com","threadId":"42302","inReplyTo":"1463134469-26071-1-git-send-email-pranit.bauva@gmail.com","subject":"Re: [PATCH] t6030: explicitly test for bisection cleanup","fromName":"Pranit Bauva","fromEmail":"pranit.bauva@gmail.com","sentAt":"2016-05-27T17:57:12Z","receivedAt":"2016-05-27T17:57:12Z","isPatch":true,"sender":{"key":"pranit.bauva@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2959938?v=4"},"body":"On Fri, May 13, 2016 at 3:44 PM, Pranit Bauva <pranit.bauva@gmail.com> wrote:\n> This is not an improvement in the test coverage but it helps in making\n> it explicit as to know what exactly is the error as other tests are\n> focussed on testing other things but they do indirectly test for this.\n>\n> Mentored-by: Lars Schneider <larsxschneider@gmail.com>\n> Mentored-by: Christian Couder <chriscool@tuxfamily.org>\n> Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>\n>\n> ---\n> I faced this problem while converting `bisect_clean_state` and the tests\n> where showing breakages but it wasn't clear as to where exactly are they\n> breaking. This will patch  will help in that. Also I tested the test\n> coverage of the test suite before this patch and it covers this (I did\n> this by purposely changing names of files in git-bisect.sh and running\n> the test suite).\n>\n> Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>\n> ---\n>  t/t6030-bisect-porcelain.sh | 17 +++++++++++++++++\n>  1 file changed, 17 insertions(+)\n>\n> diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh\n> index e74662b..1fb5ad9 100755\n> --- a/t/t6030-bisect-porcelain.sh\n> +++ b/t/t6030-bisect-porcelain.sh\n> @@ -894,4 +894,21 @@ test_expect_success 'bisect start takes options and revs in any order' '\n>         test_cmp expected actual\n>  '\n>\n> +test_expect_success 'git bisect reset cleans bisection state properly' '\n> +       git bisect reset &&\n> +       git bisect start &&\n> +       git bisect good $HASH1 &&\n> +       git bisect bad $HASH4 &&\n> +       git bisect reset &&\n> +       test -z \"$(git for-each-ref \"refs/bisect/*\")\" &&\n> +       ! test -s \"$GIT_DIR/BISECT_EXPECTED_REV\" &&\n> +       ! test -s \"$GIT_DIR/BISECT_ANCESTORS_OK\" &&\n> +       ! test -s \"$GIT_DIR/BISECT_LOG\" &&\n> +       ! test -s \"$GIT_DIR/BISECT_RUN\" &&\n> +       ! test -s \"$GIT_DIR/BISECT_TERMS\" &&\n> +       ! test -s \"$GIT_DIR/head-name\" &&\n> +       ! test -s \"$GIT_DIR/BISECT_HEAD\" &&\n> +       ! test -s \"$GIT_DIR/BISECT_START\"\n> +'\n> +\n>  test_done\n> --\n> 2.8.2\n>\n\nAnyone any comments?\n\nRegards,\nPranit Bauva\n"},{"id":"287707","messageId":"CAP8UFD0NfUZa_SH7Q9WizV0=5DbjGq58sOU2COe5NSPSSn=+-Q@mail.gmail.com","threadId":"42302","inReplyTo":"CAFZEwPMyts8msEgdHOiPfC-_HEXp8SJ7-8FQScr-af=5tSxq7w@mail.gmail.com","subject":"Re: [PATCH] t6030: explicitly test for bisection cleanup","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2016-05-27T19:00:17Z","receivedAt":"2016-05-27T19:00:17Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Fri, May 27, 2016 at 7:57 PM, Pranit Bauva <pranit.bauva@gmail.com> wrote:\n>\n> Anyone any comments?\n\nMaybe you could add this patch to, or squash it into, the patch that\nconvert bisect_clean_state to C.\n\nThanks,\nChristian.\n"},{"id":"287708","messageId":"CAFZEwPPMaCtG4VsJ31LKUP=mK_mqEekEPPrwDagyEUHHB0F2hQ@mail.gmail.com","threadId":"42302","inReplyTo":"CAP8UFD0NfUZa_SH7Q9WizV0=5DbjGq58sOU2COe5NSPSSn=+-Q@mail.gmail.com","subject":"Re: [PATCH] t6030: explicitly test for bisection cleanup","fromName":"Pranit Bauva","fromEmail":"pranit.bauva@gmail.com","sentAt":"2016-05-27T19:22:21Z","receivedAt":"2016-05-27T19:22:21Z","isPatch":true,"sender":{"key":"pranit.bauva@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2959938?v=4"},"body":"Hey Christian,\n\nOn Sat, May 28, 2016 at 12:30 AM, Christian Couder\n<christian.couder@gmail.com> wrote:\n> On Fri, May 27, 2016 at 7:57 PM, Pranit Bauva <pranit.bauva@gmail.com> wrote:\n>>\n>> Anyone any comments?\n>\n> Maybe you could add this patch to, or squash it into, the patch that\n> convert bisect_clean_state to C.\n\nSure!\n\nRegards,\nPranit Bauva\n\n> Thanks,\n> Christian.\n"}]}