From e0b672cd82ee793ebeb84907bff3d9e59559f8e5 Mon Sep 17 00:00:00 2001 From: Derrick Stolee Date: Tue, 22 Aug 2023 12:16:50 -0400 Subject: [PATCH] fixup! scalar: do initialize `gvfs.sharedCache` In this commit, we added the 'credential.interactive=never' option to unattended scalar options. This should be changed to 'false' to match the modern use of this config option. But also, we have a test that requires using askpass to get credentials, but the test is in unattended mode. Fix that test to include 'credential.interactive=true' to bypass this issue. --- scalar.c | 2 +- t/t9210-scalar.sh | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scalar.c b/scalar.c index 3030202c9794d4..120daea1f6e116 100644 --- a/scalar.c +++ b/scalar.c @@ -1403,7 +1403,7 @@ int cmd_main(int argc, const char **argv) if (is_unattended()) { setenv("GIT_ASKPASS", "", 0); setenv("GIT_TERMINAL_PROMPT", "false", 0); - git_config_push_parameter("credential.interactive=never"); + git_config_push_parameter("credential.interactive=false"); } while (argc > 1 && *argv[1] == '-') { diff --git a/t/t9210-scalar.sh b/t/t9210-scalar.sh index 95036693e10dc2..fbbf641881ac3f 100755 --- a/t/t9210-scalar.sh +++ b/t/t9210-scalar.sh @@ -303,7 +303,11 @@ test_expect_success 'start GVFS-enabled server' ' test_expect_success '`scalar clone` with GVFS-enabled server' ' : the fake cache server requires fake authentication && git config --global core.askPass true && - scalar clone --single-branch -- http://$HOST_PORT/ using-gvfs && + + # We must set credential.interactive=true to bypass a setting + # in "scalar clone" that disables interactive credentials during + # an unattended command. + scalar -c credential.interactive=true clone --single-branch -- http://$HOST_PORT/ using-gvfs && : verify that the shared cache has been configured && cache_key="url_$(printf "%s" http://$HOST_PORT/ |