aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-04-24 16:30:50 -0700
committerJunio C Hamano <gitster@pobox.com>2013-04-24 16:30:50 -0700
commitcd33b41c695be45974be38fb2f47768fc1b17190 (patch)
tree8fe251d196337118b2108c7a43a03b6347c798e8 /t
parent2d0b07178d548fd23954e3a6444f1d4d2d8b3a40 (diff)
parent0d957a4df5248b53c4160babdcfa0cefba848c93 (diff)
downloadgit-cd33b41c695be45974be38fb2f47768fc1b17190.tar.gz
git-cd33b41c695be45974be38fb2f47768fc1b17190.tar.xz
Merge branch 'jk/remote-helper-with-signed-tags'
Allows remote-helpers to declare they can handle signed tags, and issue a warning when using those that don't. * jk/remote-helper-with-signed-tags: transport-helper: add 'signed-tags' capability transport-helper: pass --signed-tags=warn-strip to fast-export fast-export: add --signed-tags=warn-strip mode
Diffstat (limited to 't')
-rwxr-xr-xt/t5801-remote-helpers.sh20
-rwxr-xr-xt/t9350-fast-export.sh6
2 files changed, 26 insertions, 0 deletions
diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh
index f387027c0..69212cdde 100755
--- a/t/t5801-remote-helpers.sh
+++ b/t/t5801-remote-helpers.sh
@@ -6,6 +6,7 @@
test_description='Test remote-helper import and export commands'
. ./test-lib.sh
+. "$TEST_DIRECTORY"/lib-gpg.sh
if ! type "${BASH-bash}" >/dev/null 2>&1; then
skip_all='skipping remote-testgit tests, bash not available'
@@ -166,4 +167,23 @@ test_expect_success 'push ref with existing object' '
compare_refs local dup server dup
'
+test_expect_success GPG 'push signed tag' '
+ (cd local &&
+ git checkout master &&
+ git tag -s -m signed-tag signed-tag &&
+ git push origin signed-tag
+ ) &&
+ compare_refs local signed-tag^{} server signed-tag^{} &&
+ test_must_fail compare_refs local signed-tag server signed-tag
+'
+
+test_expect_success GPG 'push signed tag with signed-tags capability' '
+ (cd local &&
+ git checkout master &&
+ git tag -s -m signed-tag signed-tag-2 &&
+ GIT_REMOTE_TESTGIT_SIGNED_TAGS=1 git push origin signed-tag-2
+ ) &&
+ compare_refs local signed-tag-2 server signed-tag-2
+'
+
test_done
diff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh
index 9320b4f94..2471bc677 100755
--- a/t/t9350-fast-export.sh
+++ b/t/t9350-fast-export.sh
@@ -146,6 +146,12 @@ test_expect_success 'signed-tags=strip' '
'
+test_expect_success 'signed-tags=warn-strip' '
+ git fast-export --signed-tags=warn-strip sign-your-name >output 2>err &&
+ ! grep PGP output &&
+ test -s err
+'
+
test_expect_success 'setup submodule' '
git checkout -f master &&