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

Re: [PATCH 1/2] t1300: put git invocations inside test function

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Oct 19, 2011, 06:41 UTC
Message-ID
<4E9E7115.60303@viscovery.net>
In-Reply-To
<20111012182920.GA18948@sigill.intra.peff.net>
Am 10/12/2011 20:29, schrieb Jeff King:
Show 28 quoted lines
> @@ -750,13 +759,6 @@ test_expect_success NOT_MINGW 'get --path copes with unset $HOME' '
>  	test_cmp expect result
>  '
>  
> -rm .git/config
> -
> -git config quote.leading " test"
> -git config quote.ending "test "
> -git config quote.semicolon "test;test"
> -git config quote.hash "test#test"
> -
>  cat > expect << EOF
>  [quote]
>  	leading = " test"
> @@ -764,8 +766,14 @@ cat > expect << EOF
>  	semicolon = "test;test"
>  	hash = "test#test"
>  EOF
> -
> -test_expect_success 'quoting' 'cmp .git/config expect'
> +test_expect_success 'quoting' '
> +	rm .git/config &&
> +	git config quote.leading " test" &&
> +	git config quote.ending "test " &&
> +	git config quote.semicolon "test;test" &&
> +	git config quote.hash "test#test" &&
> +	test_cmp expect .git/config
> +'

This innocently looking hunk fails on Windows, because the preceding tests are skipped, and .git/config does not exist. I was tempted to just change this to 'rm -f'. But there are a few other instances of 'rm .git/config' in this file that were *not* moved inside the test function.

How would you like this solved?
- Move this one out again
- Add -f to just this one
- Add -f everywhere
- a combination of the above?
-- Hannes
Previous: Jeff KingNext: Junio C Hamano
Message 6 of 13 in “Documentation: update [section.subsection] to reflect what git does”
  1. Documentation: update [section.subsection] to reflect what git doesCarlos Martín Nieto, Oct 12, 2011
  2. Jeff KingOct 12, 2011
  3. Jeff KingOct 12, 2011
  4. Jeff KingOct 12, 2011
  5. 1/2 t1300: put git invocations inside test functionJeff King, Oct 12, 2011
  6. Johannes SixtOct 19, 2011
  7. Junio C HamanoOct 19, 2011
  8. t1300: attempting to remove a non-existent .git/config is not an errorJohannes Sixt, Oct 19, 2011
  9. Jeff KingOct 19, 2011
  10. 2/2 t1300: test mixed-case variable retrievalJeff King, Oct 12, 2011
  11. Junio C HamanoOct 12, 2011
  12. Junio C HamanoOct 12, 2011
  13. Jeff KingOct 12, 2011

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.