diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-12-22 12:27:19 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-12-22 12:27:20 -0800 |
commit | 86362f7205a31188846de0aed94620c1f0776931 (patch) | |
tree | 8ad1f4a040a08d15d1514f26b0f8235a3a6fcf35 /t | |
parent | Merge branch 'dm/compat-s-ifmt-for-zos' (diff) | |
parent | prompt: respect GIT_TERMINAL_PROMPT to disable terminal prompts (diff) | |
download | tgif-86362f7205a31188846de0aed94620c1f0776931.tar.xz |
Merge branch 'jk/credential-quit'
Credential helpers are asked in turn until one of them give
positive response, which is cumbersome to turn off when you need to
run Git in an automated setting. The credential helper interface
learned to allow a helper to say "stop, don't ask other helpers."
Also GIT_TERMINAL_PROMPT environment can be set to false to disable
our built-in prompt mechanism for passwords.
* jk/credential-quit:
prompt: respect GIT_TERMINAL_PROMPT to disable terminal prompts
credential: let helpers tell us to quit
Diffstat (limited to 't')
-rwxr-xr-x | t/t0300-credentials.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t0300-credentials.sh b/t/t0300-credentials.sh index 57ea5a10c5..d7ef44b4a2 100755 --- a/t/t0300-credentials.sh +++ b/t/t0300-credentials.sh @@ -289,4 +289,13 @@ test_expect_success 'http paths can be part of context' ' EOF ' +test_expect_success 'helpers can abort the process' ' + test_must_fail git \ + -c credential.helper="!f() { echo quit=1; }; f" \ + -c credential.helper="verbatim foo bar" \ + credential fill >stdout && + >expect && + test_cmp expect stdout +' + test_done |