diff options
author | ZheNing Hu <adlternative@gmail.com> | 2021-07-26 03:26:50 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-07-26 19:01:26 (GMT) |
commit | b9dee075eb07713a49922f7e1f90a6a9de5c5e5f (patch) | |
tree | 989e44066bf80856880edf37ea3dbcca3a65e2f1 /t/t7030-verify-tag.sh | |
parent | e85fcb355a38b5f01493efecdf0150a10ee471da (diff) | |
download | git-b9dee075eb07713a49922f7e1f90a6a9de5c5e5f.zip git-b9dee075eb07713a49922f7e1f90a6a9de5c5e5f.tar.gz git-b9dee075eb07713a49922f7e1f90a6a9de5c5e5f.tar.bz2 |
ref-filter: add %(rest) atom
%(rest) is a atom used for cat-file batch mode, which can split
the input lines at the first whitespace boundary, all characters
before that whitespace are considered to be the object name;
characters after that first run of whitespace (i.e., the "rest"
of the line) are output in place of the %(rest) atom.
In order to let "cat-file --batch=%(rest)" use the ref-filter
interface, add %(rest) atom for ref-filter.
Introduce the reject_atom() to reject the atom %(rest) for
"git for-each-ref", "git branch", "git tag" and "git verify-tag".
Reviewed-by: Jacob Keller <jacob.keller@gmail.com>
Suggected-by: Jacob Keller <jacob.keller@gmail.com>
Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Hariom Verma <hariom18599@gmail.com>
Signed-off-by: ZheNing Hu <adlternative@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7030-verify-tag.sh')
-rwxr-xr-x | t/t7030-verify-tag.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/t/t7030-verify-tag.sh b/t/t7030-verify-tag.sh index 3cefde9..10faa64 100755 --- a/t/t7030-verify-tag.sh +++ b/t/t7030-verify-tag.sh @@ -194,6 +194,10 @@ test_expect_success GPG 'verifying tag with --format' ' test_cmp expect actual ' +test_expect_success GPG 'verifying tag with --format="%(rest)" must fail' ' + test_must_fail git verify-tag --format="%(rest)" "fourth-signed" +' + test_expect_success GPG 'verifying a forged tag with --format should fail silently' ' test_must_fail git verify-tag --format="tagname : %(tag)" $(cat forged1.tag) >actual-forged && test_must_be_empty actual-forged |