builtin/merge.c: fix a bug with trivial merges
[gitweb.git] / t / t0300-credentials.sh
index 57ea5a10c5c716f52a8c8c7335ac7f68fe9dd92d..03bd31e9f22a1964551cb07d76c45ce90a3cd17e 100755 (executable)
@@ -289,4 +289,24 @@ 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_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