git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Lukas Fleischer <lfleischer@lfos.de>,
	"git@vger.kernel.org" <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v2 4/4] t5509: add basic tests for hideRefs
Date: Wed, 4 Nov 2015 14:50:42 -0500	[thread overview]
Message-ID: <20151104195042.GA16101@sigill.intra.peff.net> (raw)
In-Reply-To: <CAPig+cQWbisskb4aQ48Oo=8_SYKZWwMK8jn_P_zsivY-xuk43g@mail.gmail.com>

On Wed, Nov 04, 2015 at 02:36:54PM -0500, Eric Sunshine wrote:

> > +test_expect_success 'try to update a hidden ref' '
> > +       test_config -C pushee transfer.hideRefs refs/heads/master &&
> > +       test_must_fail git -C original push pushee-namespaced master
> 
> In above tests, you use -c to set the configuration temporarily for
> the git invocation, but not in this and following tests. Is that
> because the -c isn't visible to sub-commands which git-push invokes?
> (Genuine question; I want to make sure I understand the reasoning.)

Yes, we explicitly clear "-c" variables when we cross repo boundaries.
You can do it like:

  git push --receive-pack='git -c transfer.hideRefs=...  receive-pack'

but that is probably more obfuscated than using test_config.

I was going to complain that "test_config -C" does not actually work,
but somehow I missed 5fafc07 (test-lib-functions: support "test_config
-C <dir> ...", 2015-09-05) going by. Very cool.

-Peff

      reply	other threads:[~2015-11-04 19:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-03  7:58 [PATCH v2 0/4] Improve hideRefs when used with namespaces Lukas Fleischer
2015-11-03  7:58 ` [PATCH v2 1/4] Document the semantics of hideRefs " Lukas Fleischer
2015-11-03 21:09   ` Junio C Hamano
2015-11-03  7:58 ` [PATCH v2 2/4] upload-pack: strip refs before calling ref_is_hidden() Lukas Fleischer
2015-11-03  7:58 ` [PATCH v2 3/4] Add support for matching full refs in hideRefs Lukas Fleischer
2015-11-03 21:07   ` Junio C Hamano
2015-11-04 19:09     ` Junio C Hamano
2015-11-03  7:58 ` [PATCH v2 4/4] t5509: add basic tests for hideRefs Lukas Fleischer
2015-11-04 19:36   ` Eric Sunshine
2015-11-04 19:50     ` Jeff King [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=20151104195042.GA16101@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=lfleischer@lfos.de \
    --cc=sunshine@sunshineco.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).