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

[PATCH 0/2] ./t5512-*.sh -x complaints

From
Jeff King <peff@peff.net>
Date
Aug 6, 2015, 05:29 UTC
Message-ID
<20150806052940.GA32445@sigill.intra.peff.net>
In-Reply-To
<20150806045535.GA7014@sigill.intra.peff.net>
On Thu, Aug 06, 2015 at 12:55:35AM -0400, Jeff King wrote:
Show 8 quoted lines
> PS I don't recall the outcome of our last discussion on the "verbose"
>    test function. Here it makes debug output for the "grep" above more
>    readable when it fails. But it also looks weird not to have the
>    matching negative one for the final grep (which could be
>    test_must_fail in this case, but we do not usually apply that to
>    non-git commands). If you would prefer to strip out the "verbose"
>    (from here and the test just below) while squashing, I am OK with
>    that.

Here's a squashable patch for that, in case it is easier (on top of the previous squash; I am happy to just send a re-rolled patch if you'd prefer):

diff --git a/t/t5512-ls-remote.sh b/t/t5512-ls-remote.sh
index 7756100..aadaac5 100755
--- a/t/t5512-ls-remote.sh
+++ b/t/t5512-ls-remote.sh
@@ -150,7 +150,7 @@ do
 		git config --add $configsection.hiderefs "!refs/tags/magic" &&
 		git config --add $configsection.hiderefs refs/tags/magic/one &&
 		git ls-remote . >actual &&
-		verbose grep refs/tags/magic/two actual &&
+		grep refs/tags/magic/two actual &&
 		! grep refs/tags/magic/one actual
 	'
 
@@ -160,7 +160,7 @@ test_expect_success 'overrides work between mixed transfer/upload-pack hideRefs'
 	test_config uploadpack.hiderefs refs/tags &&
 	test_config transfer.hiderefs "!refs/tags/magic" &&
 	git ls-remote . >actual &&
-	verbose grep refs/tags/magic actual
+	grep refs/tags/magic actual
 '
 
 test_done

I think the last discussion did end up with "eh, now that we have -x it
is simpler to just use that". Of course, then I tried to _use_ -x and
found some small niggles.  So here are fixes for those:

  [1/2]: test-lib: turn off "-x" tracing during chain-lint check
  [2/2]: test-lib: disable trace when test is not verbose

-Peff
Previous: Jeff KingNext: Jeff King
Message 6 of 10 in “What's cooking in git.git”
  1. Junio C HamanoAug 5, 2015
  2. David TurnerAug 5, 2015
  3. Junio C HamanoAug 5, 2015
  4. Junio C HamanoAug 7, 2015
  5. Jeff KingAug 6, 2015
  6. 0/2 ./t5512-*.sh -x complaintsJeff King, Aug 6, 2015
  7. 1/2 test-lib: turn off "-x" tracing during chain-lint checkJeff King, Aug 6, 2015
  8. 2/2 test-lib: disable trace when test is not verboseJeff King, Aug 6, 2015
  9. Junio C HamanoAug 7, 2015
  10. Johannes SchindelinAug 6, 2015

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.