Thread (7 messages) flat view 7 messages, 3 authors, 2016-06-15

Re: [PATCH v2 4/4] t5509: add basic tests for hideRefs

From: Jeff King <hidden>
Date: 2016-06-15 23:07:11

On Wed, Nov 04, 2015 at 02:36:54PM -0500, Eric Sunshine wrote:
quoted
+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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help