aboutsummaryrefslogtreecommitdiff
path: root/t/t5534-push-signed.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-08-18 13:46:58 -0700
committerJunio C Hamano <gitster@pobox.com>2014-09-15 13:23:28 -0700
commit20a7558f31e44e26ddbb8aa55bfd9316a6b67f82 (patch)
treecda6e1cd72ff5201be6613f89eb9ca34eca92c90 /t/t5534-push-signed.sh
parentd05b9618ce42e85936176537f939a4eb85d4d65e (diff)
downloadgit-20a7558f31e44e26ddbb8aa55bfd9316a6b67f82.tar.gz
git-20a7558f31e44e26ddbb8aa55bfd9316a6b67f82.tar.xz
send-pack: send feature request on push-cert packet
We would want to update the interim protocol so that we do not send the usual update commands when the push certificate feature is in use, as the same information is in the certificate. Once that happens, the push-cert packet may become the only protocol command, but then there is no packet to put the feature request behind, like we always did. As we have prepared the receiving end that understands the push-cert feature to accept the feature request on the first protocol packet (other than "shallow ", which was an unfortunate historical mistake that has to come before everything else), we can give the feature request on the push-cert packet instead of the first update protocol packet, in preparation for the next step to actually update to the final protocol. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5534-push-signed.sh')
-rwxr-xr-xt/t5534-push-signed.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t5534-push-signed.sh b/t/t5534-push-signed.sh
index 4198b6a2f..2f4b74ed8 100755
--- a/t/t5534-push-signed.sh
+++ b/t/t5534-push-signed.sh
@@ -73,6 +73,19 @@ test_expect_success 'push --signed fails with a receiver without push certificat
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 &&
+ write_script dst/.git/hooks/post-receive <<-\EOF &&
+ if test -n "${GIT_PUSH_CERT-}"
+ then
+ git cat-file blob $GIT_PUSH_CERT >../push-cert
+ fi
+ EOF
+ git push dst noop &&
+ ! test -f dst/push-cert
+'
+
test_expect_success GPG 'signed push sends push certificate' '
prepare_dst &&
mkdir -p dst/.git/hooks &&