Re: [PATCH 08/16] t/t5516-fetch-push: use test_config()
From: Johannes Sixt <hidden>
Date: 2016-06-15 22:57:52
Am 22.06.2013 00:32, schrieb Junio C Hamano:
Ramkumar Ramachandra [off-list ref] writes:quoted
Replace the 'git config' calls in tests with test_config for greater robustness.That may be a good thing in principle, but I _think_ mk_empty testrepo && ( cd testrepo && do whatever to its config && run test ) sequence is used so that we do not even have to worry about what leftover configuration values are in the testrepo/.git/config; so does it really matter? If this conversion had something more than "s/git config/test_config/" replacement, that would indicate that you uncovered a bug in the existing test and found a good fix, but that does not seem to be the case for this particular patch.
And just let me add that the added benefit of test_config to remove the configuration change after the test case finished would not work because the test_when_finished registration that happens behind the scenes would be forgotten when the sub-shell exits.
quoted
@@ -142,8 +142,8 @@ test_expect_success 'fetch with wildcard' ' mk_empty testrepo && ( cd testrepo && - git config remote.up.url .. && - git config remote.up.fetch "refs/heads/*:refs/remotes/origin/*" && + test_config remote.up.url .. && + test_config remote.up.fetch "refs/heads/*:refs/remotes/origin/*" && git fetch up &&
... -- Hannes