git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] test: bisect-porcelain: fix location of files

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 21, 2020, 21:08 UTC
Message-ID
<xmqqk0talve7.fsf@gitster.c.googlers.com>
In-Reply-To
<20201218151406.1193792-1-felipe.contreras@gmail.com>
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.
Show 10 quoted lines
>
> 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(-)
Show 28 quoted lines
>
> 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
Previous: Junio C Hamano
Message 5 of 5 in “test: bisect-porcelain: fix location of files”
  1. test: bisect-porcelain: fix location of filesFelipe Contreras, Dec 18, 2020
  2. Christian CouderDec 18, 2020
  3. Felipe ContrerasDec 18, 2020
  4. Junio C HamanoDec 21, 2020
  5. Junio C HamanoDec 21, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.