Re: [PATCH v4 2/6] t6030: explicitly test for bisection cleanup
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 11, 2016, 19:16 UTC
- Message-ID
- <xmqq37ng9e9v.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20160706202523.9850-3-pranit.bauva@gmail.com>
Pranit Bauva <pranit.bauva@gmail.com> writes:
> Add test to explicitly check that 'git bisect reset' is working as > expected. This is already covered implicitly by the test suite.
Without fuzzy "this is not an improvement but it helps" that sounds like making excuse, the above reads much better.
Show 43 quoted lines
> Mentored-by: Lars Schneider <larsxschneider@gmail.com> > Mentored-by: Christian Couder <chriscool@tuxfamily.org> > Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com> > > --- > I faced this problem while converting `bisect_clean_state` and the tests > where showing breakages but it wasn't clear as to where exactly are they > breaking. This will patch will help in that. Also I tested the test > coverage of the test suite before this patch and it covers this (I did > this by purposely changing names of files in git-bisect.sh and running > the test suite). > > Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com> > --- > t/t6030-bisect-porcelain.sh | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh > index e74662b..a17f7a6 100755 > --- a/t/t6030-bisect-porcelain.sh > +++ b/t/t6030-bisect-porcelain.sh > @@ -894,4 +894,21 @@ test_expect_success 'bisect start takes options and revs in any order' ' > test_cmp expected actual > ' > > +test_expect_success 'git bisect reset cleans bisection state properly' ' > + git bisect reset && > + git bisect start && > + git bisect good $HASH1 && > + git bisect bad $HASH4 && > + git bisect reset && > + test -z "$(git for-each-ref "refs/bisect/*")" && > + test_path_is_missing "$GIT_DIR/BISECT_EXPECTED_REV" && > + test_path_is_missing "$GIT_DIR/BISECT_ANCESTORS_OK" && > + test_path_is_missing "$GIT_DIR/BISECT_LOG" && > + test_path_is_missing "$GIT_DIR/BISECT_RUN" && > + test_path_is_missing "$GIT_DIR/BISECT_TERMS" && > + test_path_is_missing "$GIT_DIR/head-name" && > + test_path_is_missing "$GIT_DIR/BISECT_HEAD" && > + test_path_is_missing "$GIT_DIR/BISECT_START" > +' > + > test_done