summaryrefslogtreecommitdiff
path: root/t/t5534-push-signed.sh
diff options
context:
space:
mode:
authorMartin Ågren <martin.agren@gmail.com>2017-08-07 18:20:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-08-07 20:27:21 (GMT)
commitc4b71a77828ffe7154c2e0bbc5e8a34e843f2f3f (patch)
tree5fc7fc510f643213355c94598a62a8a5c64ad8ad /t/t5534-push-signed.sh
parenta81383badc50633fe459d8d2d10ee7af6c00abb7 (diff)
downloadgit-c4b71a77828ffe7154c2e0bbc5e8a34e843f2f3f.zip
git-c4b71a77828ffe7154c2e0bbc5e8a34e843f2f3f.tar.gz
git-c4b71a77828ffe7154c2e0bbc5e8a34e843f2f3f.tar.bz2
t5334: document that git push --signed=1 does not work
When accepting booleans as command-line or config options throughout Git, there are several documented synonyms for true and false. However, one particular user is slightly broken: `git push --signed=..` does not understand the integer synonyms for true and false. This is hardly wanted. The --signed option has a different notion of boolean than all other arguments and config options, including the config option corresponding to it, push.gpgSign. Add a test documenting the failure to handle --signed=1. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5534-push-signed.sh')
-rwxr-xr-xt/t5534-push-signed.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t5534-push-signed.sh b/t/t5534-push-signed.sh
index ecb8d44..591a262 100755
--- a/t/t5534-push-signed.sh
+++ b/t/t5534-push-signed.sh
@@ -71,6 +71,13 @@ test_expect_success 'push --signed fails with a receiver without push certificat
test_i18ngrep "the receiving end does not support" err
'
+test_expect_failure 'push --signed=1 is accepted' '
+ prepare_dst &&
+ mkdir -p dst/.git/hooks &&
+ test_must_fail git push --signed=1 dst noop ff +noff 2>err &&
+ test_i18ngrep "the receiving end does not support" err
+'
+
test_expect_success GPG 'no certificate for a signed push with no update' '
prepare_dst &&
mkdir -p dst/.git/hooks &&