Skip to content

Commit

Permalink
fixup! scalar: do initialize gvfs.sharedCache
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
derrickstolee committed Aug 23, 2023
1 parent 7b1c35e commit 73fe2ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scalar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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] == '-') {
Expand Down
6 changes: 5 additions & 1 deletion t/t9210-scalar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/ |
Expand Down

0 comments on commit 73fe2ea

Please sign in to comment.