From: Junio C Hamano <gitster@pobox.com>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org, Pranit Bauva <pranit.bauva@gmail.com>,
Christian Couder <chriscool@tuxfamily.org>,
Lars Schneider <larsxschneider@gmail.com>
Subject: Re: [PATCH] test: bisect-porcelain: fix location of files
Date: Mon, 21 Dec 2020 13:08:32 -0800 [thread overview]
Message-ID: <xmqqk0talve7.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20201218151406.1193792-1-felipe.contreras@gmail.com> (Felipe Contreras's message of "Fri, 18 Dec 2020 09:14:06 -0600")
Felipe Contreras <felipe.contreras@gmail.com> writes:
> Commit ba7eafe146 (t6030: explicitly test for bisection cleanup,
> 2017-09-29) introduced checks for files in the $GIT_DIR directory, but
> that variable is not always defined, and in this test file it's not.
It is somewhat surprising that nobody caught it for 3 years, but
perhaps nobody cared very deeply (and it must have helped that the
feature it purports to test is not broken).
Will queue.
>
> Therefore these checks always passed regardless of the presence of these
> files (unless the user has some /BISECT_LOG file, for some reason).
>
> Let's check the files in the correct location.
>
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
> t/t6030-bisect-porcelain.sh | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh
> index 34099160ed..6d5440d704 100755
> --- a/t/t6030-bisect-porcelain.sh
> +++ b/t/t6030-bisect-porcelain.sh
> @@ -926,14 +926,14 @@ test_expect_success 'git bisect reset cleans bisection state properly' '
> 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_path_is_missing ".git/BISECT_EXPECTED_REV" &&
> + test_path_is_missing ".git/BISECT_ANCESTORS_OK" &&
> + test_path_is_missing ".git/BISECT_LOG" &&
> + test_path_is_missing ".git/BISECT_RUN" &&
> + test_path_is_missing ".git/BISECT_TERMS" &&
> + test_path_is_missing ".git/head-name" &&
> + test_path_is_missing ".git/BISECT_HEAD" &&
> + test_path_is_missing ".git/BISECT_START"
> '
>
> test_done
prev parent reply other threads:[~2020-12-21 21:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-18 15:14 [PATCH] test: bisect-porcelain: fix location of files Felipe Contreras
2020-12-18 15:36 ` Christian Couder
2020-12-18 15:50 ` Felipe Contreras
2020-12-21 20:10 ` Junio C Hamano
2020-12-21 21:08 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqk0talve7.fsf@gitster.c.googlers.com \
--to=gitster@pobox.com \
--cc=chriscool@tuxfamily.org \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=larsxschneider@gmail.com \
--cc=pranit.bauva@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).