git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: [PATCH 0/2] ./t5512-*.sh -x complaints
Date: Thu, 6 Aug 2015 01:29:41 -0400	[thread overview]
Message-ID: <20150806052940.GA32445@sigill.intra.peff.net> (raw)
In-Reply-To: <20150806045535.GA7014@sigill.intra.peff.net>

On Thu, Aug 06, 2015 at 12:55:35AM -0400, Jeff King wrote:

> 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

  reply	other threads:[~2015-08-06  5:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-05 22:55 What's cooking in git.git Junio C Hamano
2015-08-05 23:14 ` David Turner
2015-08-05 23:58   ` Junio C Hamano
2015-08-07 16:40     ` Junio C Hamano
2015-08-06  4:55 ` Jeff King
2015-08-06  5:29   ` Jeff King [this message]
2015-08-06  5:31     ` [PATCH 1/2] test-lib: turn off "-x" tracing during chain-lint check Jeff King
2015-08-06  5:33     ` [PATCH 2/2] test-lib: disable trace when test is not verbose Jeff King
2015-08-07 18:47   ` What's cooking in git.git Junio C Hamano
2015-08-06 10:19 ` Johannes Schindelin

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=20150806052940.GA32445@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).