diff options
author | Jeff King <peff@peff.net> | 2016-02-26 05:51:35 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-02-26 10:58:14 -0800 |
commit | 24321375cda79f141be72d1a842e930df6f41725 (patch) | |
tree | cd0e5845a6fba7b3cc32c81d82b75c96643a3a7b /t/t0300-credentials.sh | |
parent | 56f37fda511e1615dc6df86c68f3b841711a7828 (diff) | |
download | git-24321375cda79f141be72d1a842e930df6f41725.tar.gz git-24321375cda79f141be72d1a842e930df6f41725.tar.xz |
credential: let empty credential specs reset helper list
Sine the credential.helper key is a multi-valued config
list, there's no way to "unset" a helper once it's been set.
So if your system /etc/gitconfig sets one, you can never
avoid running it, but only add your own helpers on top.
Since an empty value for credential.helper is nonsensical
(it would just try to run "git-credential-"), we can assume
nobody is using it. Let's define it to reset the helper
list, letting you override lower-priority instances which
have come before.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0300-credentials.sh')
-rwxr-xr-x | t/t0300-credentials.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t0300-credentials.sh b/t/t0300-credentials.sh index d7ef44b4a..03bd31e9f 100755 --- a/t/t0300-credentials.sh +++ b/t/t0300-credentials.sh @@ -298,4 +298,15 @@ test_expect_success 'helpers can abort the process' ' test_cmp expect stdout ' +test_expect_success 'empty helper spec resets helper list' ' + test_config credential.helper "verbatim file file" && + check fill "" "verbatim cmdline cmdline" <<-\EOF + -- + username=cmdline + password=cmdline + -- + verbatim: get + EOF +' + test_done |