Re: [PATCH 12/14] test: completion: use global config
From: Junio C Hamano <hidden>
Date: 2019-07-03 17:22:36
Felipe Contreras [off-list ref] writes:
When appropriate.
It is unclear what makes these (but not other use of test_config) appropriate.
quoted hunk
Signed-off-by: Felipe Contreras <redacted> --- t/t9902-completion.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index 7bef41eaf5..3dbfef6960 100755 --- a/t/t9902-completion.sh +++ b/t/t9902-completion.sh@@ -1497,9 +1497,9 @@ test_expect_success 'git --help completion' ' test_completion "git --help core" "core-tutorial " ' -test_expect_failure 'completion.commands removes multiple commands' ' +test_expect_success 'completion.commands removes multiple commands' ' offgit && - test_config completion.commands "-cherry -mergetool" && + test_config_global completion.commands "-cherry -mergetool" &&
This feels more like fixing a bug introduced by step 11/14 in that (besides doing "offgit" that affects global test environment outside a subshell) we want to do this test outside a repository so there is no appropriate "local" configuration "git config" (hence test_config) can touch. IOW, shouldn't this have been done in the step 11/14 when "offgit" was added?