diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-12-01 13:58:46 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-12-01 13:58:46 -0800 |
commit | c4d48ab5afc34b59582593622ef04da2543573d4 (patch) | |
tree | 46791a56efec952ce75577fbc87b352d1fa8dfe4 /t | |
parent | 2221a6757161af1905925c405aded9ff470f70d5 (diff) | |
parent | 10507857fe8c5d8774d016a8542c8dd572271a8a (diff) | |
download | git-c4d48ab5afc34b59582593622ef04da2543573d4.tar.gz git-c4d48ab5afc34b59582593622ef04da2543573d4.tar.xz |
Merge branch 'cr/tag-options'
* cr/tag-options:
git-tag: test that -s implies an annotated tag
"git-tag -s" should create a signed annotated tag
builtin-tag: accept and process multiple -m just like git-commit
Make builtin-tag.c use parse_options.
Diffstat (limited to 't')
-rwxr-xr-x | t/t7004-tag.sh | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh index 5f7e388d7..c7130c4dc 100755 --- a/t/t7004-tag.sh +++ b/t/t7004-tag.sh @@ -339,20 +339,14 @@ test_expect_success \ ' test_expect_success \ - 'trying to create tags giving many -m or -F options should fail' ' + 'trying to create tags giving both -m or -F options should fail' ' echo "message file 1" >msgfile1 && echo "message file 2" >msgfile2 && ! tag_exists msgtag && - ! git-tag -m "message 1" -m "message 2" msgtag && - ! tag_exists msgtag && - ! git-tag -F msgfile1 -F msgfile2 msgtag && - ! tag_exists msgtag && ! git-tag -m "message 1" -F msgfile1 msgtag && ! tag_exists msgtag && ! git-tag -F msgfile1 -m "message 1" msgtag && ! tag_exists msgtag && - ! git-tag -F msgfile1 -m "message 1" -F msgfile2 msgtag && - ! tag_exists msgtag && ! git-tag -m "message 1" -F msgfile1 -m "message 2" msgtag && ! tag_exists msgtag ' @@ -673,6 +667,22 @@ test_expect_success 'creating a signed tag with -F - should succeed' ' git diff expect actual ' +cat >fakeeditor <<'EOF' +#!/bin/sh +test -n "$1" && exec >"$1" +echo A signed tag message +echo from a fake editor. +EOF +chmod +x fakeeditor +get_tag_header implied-annotate $commit commit $time >expect +./fakeeditor >>expect +echo '-----BEGIN PGP SIGNATURE-----' >>expect +test_expect_success '-s implies annotated tag' ' + GIT_EDITOR=./fakeeditor git-tag -s implied-annotate && + get_tag_msg implied-annotate >actual && + git diff expect actual +' + test_expect_success \ 'trying to create a signed tag with non-existing -F file should fail' ' ! test -f nonexistingfile && |