(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <'git tag\n'> <'\n'> <'Tests for operations with tags.'>)} spids: [13] ) ] spids: [13] ) (C {(.)} {(./test-lib.sh)}) (C {(.)} {(DQ ($ VSub_Name '$TEST_DIRECTORY')) (/lib-gpg.sh)}) (FuncDef name: tag_exists body: (BraceGroup children: [ (C {(git)} {(show-ref)} {(--quiet)} {(--verify)} {(refs/tags/) (DQ ($ VSub_Number '$1'))}) ] spids: [42] ) spids: [37 41] ) (C {(test_expect_success)} {(SQ <'listing all tags in an empty tree should succeed'>)} {(SQ <'\n'> <'\tgit tag -l &&\n'> <'\tgit tag\n'>)} ) (C {(test_expect_success)} {(SQ <'listing all tags in an empty tree should output nothing'>)} {(SQ <'\n'> <'\ttest $(git tag -l | wc -l) -eq 0 &&\n'> <'\ttest $(git tag | wc -l) -eq 0\n'>)} ) (C {(test_expect_success)} {(SQ <'looking for a tag in an empty tree should fail'>)} {(SQ <'! (tag_exists mytag)'>)} ) (C {(test_expect_success)} {(SQ <'creating a tag in an empty tree should fail'>)} {(SQ <'\n'> <'\ttest_must_fail git tag mynotag &&\n'> <'\t! tag_exists mynotag\n'>)} ) (C {(test_expect_success)} {(SQ <'creating a tag for HEAD in an empty tree should fail'>)} {(SQ <'\n'> <'\ttest_must_fail git tag mytaghead HEAD &&\n'> <'\t! tag_exists mytaghead\n'>)} ) (C {(test_expect_success)} {(SQ <'creating a tag for an unknown revision should fail'>)} { (SQ <'\n'> <'\ttest_must_fail git tag mytagnorev aaaaaaaaaaa &&\n'> <'\t! tag_exists mytagnorev\n'> ) } ) (C {(test_expect_success)} {(SQ <'creating a tag using default HEAD should succeed'>)} { (SQ <'\n'> <'\ttest_tick &&\n'> <'\techo foo >foo &&\n'> <'\tgit add foo &&\n'> <'\tgit commit -m Foo &&\n'> <'\tgit tag mytag &&\n'> <'\ttest_must_fail git reflog exists refs/tags/mytag\n'> ) } ) (C {(test_expect_success)} {(SQ <'creating a tag with --create-reflog should create reflog'>)} { (SQ <'\n'> <'\ttest_when_finished "git tag -d tag_with_reflog" &&\n'> <'\tgit tag --create-reflog tag_with_reflog &&\n'> <'\tgit reflog exists refs/tags/tag_with_reflog\n'> ) } ) (C {(test_expect_success)} {(SQ <'--create-reflog does not create reflog on failure'>)} { (SQ <'\n'> <'\ttest_must_fail git tag --create-reflog mytag &&\n'> <'\ttest_must_fail git reflog exists refs/tags/mytag\n'> ) } ) (C {(test_expect_success)} {(SQ <'listing all tags if one exists should succeed'>)} {(SQ <'\n'> <'\tgit tag -l &&\n'> <'\tgit tag\n'>)} ) (C {(test_expect_success)} {(SQ <'listing all tags if one exists should output that tag'>)} {(SQ <'\n'> <'\ttest $(git tag -l) = mytag &&\n'> <'\ttest $(git tag) = mytag\n'>)} ) (C {(test_expect_success)} {(SQ <'listing a tag using a matching pattern should succeed'>)} {(SQ <'git tag -l mytag'>)} ) (C {(test_expect_success)} {(SQ <'listing a tag using a matching pattern should output that tag'>)} {(SQ <'test $(git tag -l mytag) = mytag'>)} ) (C {(test_expect_success)} {(SQ <'listing tags using a non-matching pattern should suceed'>)} {(SQ <'git tag -l xxx'>)} ) (C {(test_expect_success)} {(SQ <'listing tags using a non-matching pattern should output nothing'>)} {(SQ <'test $(git tag -l xxx | wc -l) -eq 0'>)} ) (C {(test_expect_success)} {(SQ <'trying to create a tag with the name of one existing should fail'>)} {(SQ <'test_must_fail git tag mytag'>)} ) (C {(test_expect_success)} {(SQ <'trying to create a tag with a non-valid name should fail'>)} { (SQ <'\n'> <'\ttest $(git tag -l | wc -l) -eq 1 &&\n'> <'\ttest_must_fail git tag "" &&\n'> <'\ttest_must_fail git tag .othertag &&\n'> <'\ttest_must_fail git tag "other tag" &&\n'> <'\ttest_must_fail git tag "othertag^" &&\n'> <'\ttest_must_fail git tag "other~tag" &&\n'> <'\ttest $(git tag -l | wc -l) -eq 1\n'> ) } ) (C {(test_expect_success)} {(SQ <'creating a tag using HEAD directly should succeed'>)} {(SQ <'\n'> <'\tgit tag myhead HEAD &&\n'> <'\ttag_exists myhead\n'>)} ) (C {(test_expect_success)} {(SQ <'--force can create a tag with the name of one existing'>)} { (SQ <'\n'> <'\ttag_exists mytag &&\n'> <'\tgit tag --force mytag &&\n'> <'\ttag_exists mytag'>) } ) (C {(test_expect_success)} {(SQ <'--force is moot with a non-existing tag name'>)} { (SQ <'\n'> <'\tgit tag newtag >expect &&\n'> <'\tgit tag --force forcetag >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(git)} {(tag)} {(-d)} {(newtag)} {(forcetag)}) (C {(test_expect_success)} {(SQ <'trying to delete an unknown tag should fail'>)} {(SQ <'\n'> <'\t! tag_exists unknown-tag &&\n'> <'\ttest_must_fail git tag -d unknown-tag\n'>)} ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[389]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ('myhead\n') ('mytag\n'))} do_expansion: True here_end: EOF was_filled: True spids: [392] ) ] ) (C {(test_expect_success)} {(SQ <'trying to delete tags without params should succeed and do nothing'>)} { (SQ <'\n'> <'\tgit tag -l > actual && test_cmp expect actual &&\n'> <'\tgit tag -d &&\n'> <'\tgit tag -l > actual && test_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'deleting two existing tags in one command should succeed'>)} { (SQ <'\n'> <'\ttag_exists mytag &&\n'> <'\ttag_exists myhead &&\n'> <'\tgit tag -d mytag myhead &&\n'> <'\t! tag_exists mytag &&\n'> <'\t! tag_exists myhead\n'> ) } ) (C {(test_expect_success)} {(SQ <'creating a tag with the name of another deleted one should succeed'>)} {(SQ <'\n'> <'\t! tag_exists mytag &&\n'> <'\tgit tag mytag &&\n'> <'\ttag_exists mytag\n'>)} ) (C {(test_expect_success)} {(SQ <'trying to delete two tags, existing and not, should fail in the 2nd'>)} { (SQ <'\n'> <'\ttag_exists mytag &&\n'> <'\t! tag_exists myhead &&\n'> <'\ttest_must_fail git tag -d mytag anothertag &&\n'> <'\t! tag_exists mytag &&\n'> <'\t! tag_exists myhead\n'> ) } ) (C {(test_expect_success)} {(SQ <'trying to delete an already deleted tag should fail'>)} {(SQ <'test_must_fail git tag -d mytag'>)} ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[485]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ('a1\n') ('aa1\n') ('cba\n') ('t210\n') ('t211\n') ('v0.2.1\n') ('v1.0\n') ('v1.0.1\n') ('v1.1.3\n') ) } do_expansion: True here_end: EOF was_filled: True spids: [488] ) ] ) (C {(test_expect_success)} {(SQ <'listing all tags should print them ordered'>)} { (SQ <'\n'> <'\tgit tag v1.0.1 &&\n'> <'\tgit tag t211 &&\n'> <'\tgit tag aa1 &&\n'> <'\tgit tag v0.2.1 &&\n'> <'\tgit tag v1.1.3 &&\n'> <'\tgit tag cba &&\n'> <'\tgit tag a1 &&\n'> <'\tgit tag v1.0 &&\n'> <'\tgit tag t210 &&\n'> <'\tgit tag -l > actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag > actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[527]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ('a1\n') ('aa1\n') ('cba\n'))} do_expansion: True here_end: EOF was_filled: True spids: [530] ) ] ) (C {(test_expect_success)} {(SQ <'listing tags with substring as pattern must print those matching'>)} {(SQ <'\n'> <'\trm *a* &&\n'> <'\tgit tag -l "*a*" > current &&\n'> <'\ttest_cmp expect current\n'>)} ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[555]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ('v0.2.1\n') ('v1.0.1\n'))} do_expansion: True here_end: EOF was_filled: True spids: [558] ) ] ) (C {(test_expect_success)} {(SQ <'listing tags with a suffix as pattern must print those matching'>)} {(SQ <'\n'> <'\tgit tag -l "*.1" > actual &&\n'> <'\ttest_cmp expect actual\n'>)} ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[581]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ('t210\n') ('t211\n'))} do_expansion: True here_end: EOF was_filled: True spids: [584] ) ] ) (C {(test_expect_success)} {(SQ <'listing tags with a prefix as pattern must print those matching'>)} {(SQ <'\n'> <'\tgit tag -l "t21*" > actual &&\n'> <'\ttest_cmp expect actual\n'>)} ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[607]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ('a1\n'))} do_expansion: True here_end: EOF was_filled: True spids: [610] ) ] ) (C {(test_expect_success)} {(SQ <'listing tags using a name as pattern must print that one matching'>)} {(SQ <'\n'> <'\tgit tag -l a1 > actual &&\n'> <'\ttest_cmp expect actual\n'>)} ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[632]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ('v1.0\n'))} do_expansion: True here_end: EOF was_filled: True spids: [635] ) ] ) (C {(test_expect_success)} {(SQ <'listing tags using a name as pattern must print that one matching'>)} {(SQ <'\n'> <'\tgit tag -l v1.0 > actual &&\n'> <'\ttest_cmp expect actual\n'>)} ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[657]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ('v1.0.1\n') ('v1.1.3\n'))} do_expansion: True here_end: EOF was_filled: True spids: [660] ) ] ) (C {(test_expect_success)} {(SQ <'listing tags with ? in the pattern should print those matching'>)} {(SQ <'\n'> <'\tgit tag -l "v1.?.?" > actual &&\n'> <'\ttest_cmp expect actual\n'>)} ) (SimpleCommand redirects:[(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[681])]) (C {(test_expect_success)} {(SQ <'listing tags using v.* should print nothing because none have v.'>)} {(SQ <'\n'> <'\tgit tag -l "v.*" > actual &&\n'> <'\ttest_cmp expect actual\n'>)} ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[701]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ('v0.2.1\n') ('v1.0\n') ('v1.0.1\n') ('v1.1.3\n'))} do_expansion: True here_end: EOF was_filled: True spids: [704] ) ] ) (C {(test_expect_success)} {(SQ <'listing tags using v* should print only those having v'>)} {(SQ <'\n'> <'\tgit tag -l "v*" > actual &&\n'> <'\ttest_cmp expect actual\n'>)} ) (C {(test_expect_success)} {(SQ <'tag -l can accept multiple patterns'>)} {(SQ <'\n'> <'\tgit tag -l "v1*" "v0*" >actual &&\n'> <'\ttest_cmp expect actual\n'>)} ) (C {(test_expect_success)} {(SQ <'listing tags in column'>)} { (SQ <'\n'> <'\tCOLUMNS=40 git tag -l --column=row >actual &&\n'> <'\tcat >expected <<\\EOF &&\n'> <'a1 aa1 cba t210 t211\n'> <'v0.2.1 v1.0 v1.0.1 v1.1.3\n'> <'EOF\n'> <'\ttest_cmp expected actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'listing tags in column with column.*'>)} { (SQ <'\n'> <'\tgit config column.tag row &&\n'> <'\tgit config column.ui dense &&\n'> <'\tCOLUMNS=40 git tag -l >actual &&\n'> <'\tgit config --unset column.ui &&\n'> <'\tgit config --unset column.tag &&\n'> <'\tcat >expected <<\\EOF &&\n'> <'a1 aa1 cba t210 t211\n'> <'v0.2.1 v1.0 v1.0.1 v1.1.3\n'> <'EOF\n'> <'\ttest_cmp expected actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'listing tag with -n --column should fail'>)} {(SQ <'\n'> <'\ttest_must_fail git tag --column -n\n'>)} ) (C {(test_expect_success)} {(SQ <'listing tags -n in column with column.ui ignored'>)} { (SQ <'\n'> <'\tgit config column.ui "row dense" &&\n'> <'\tCOLUMNS=40 git tag -l -n >actual &&\n'> <'\tgit config --unset column.ui &&\n'> <'\tcat >expected <<\\EOF &&\n'> <'a1 Foo\n'> <'aa1 Foo\n'> <'cba Foo\n'> <'t210 Foo\n'> <'t211 Foo\n'> <'v0.2.1 Foo\n'> <'v1.0 Foo\n'> <'v1.0.1 Foo\n'> <'v1.1.3 Foo\n'> <'EOF\n'> <'\ttest_cmp expected actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'a non-annotated tag created without parameters should point to HEAD'>)} { (SQ <'\n'> <'\tgit tag non-annotated-tag &&\n'> <'\ttest $(git cat-file -t non-annotated-tag) = commit &&\n'> <'\ttest $(git rev-parse non-annotated-tag) = $(git rev-parse HEAD)\n'> ) } ) (C {(test_expect_success)} {(SQ <'trying to verify an unknown tag should fail'>)} {(SQ <'test_must_fail git tag -v unknown-tag'>)} ) (C {(test_expect_success)} {(SQ <'trying to verify a non-annotated and non-signed tag should fail'>)} {(SQ <'test_must_fail git tag -v non-annotated-tag'>)} ) (C {(test_expect_success)} {(SQ <'trying to verify many non-annotated or unknown tags, should fail'>)} {(SQ <'test_must_fail git tag -v unknown-tag1 non-annotated-tag unknown-tag2'>)} ) (FuncDef name: get_tag_msg body: (BraceGroup children: [ (Pipeline children: [ (C {(git)} {(cat-file)} {(tag)} {(DQ ($ VSub_Number '$1'))}) (C {(sed)} {(-e)} {(DQ ('/BEGIN PGP/q'))}) ] negated: False ) ] spids: [888] ) spids: [883 887] ) (FuncDef name: get_tag_header body: (BraceGroup children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ('object ') ($ VSub_Number '$2') ('\n') ('type ') ($ VSub_Number '$3') ('\n') ('tag ') ($ VSub_Number '$1') ('\n') ('tagger C O Mitter <committer@example.com> ') ($ VSub_Number '$4') (' -0700\n') ('\n') ) } do_expansion: True here_end: EOF was_filled: True spids: [926] ) ] ) ] spids: [922] ) spids: [917 921] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:commit) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(git)} {(rev-parse)} {(HEAD)})]) left_token: <Left_CommandSub '$('> spids: [947 953] ) } spids: [946] ) ] spids: [946] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:time) op: Equal rhs: {($ VSub_Name '$test_tick')} spids: [955] ) ] spids: [955] ) (SimpleCommand words: [ {(get_tag_header)} {(annotated-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[969])] ) (SimpleCommand words: [{(echo)} {(DQ ('A message'))}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[978])] ) (C {(test_expect_success)} {(SQ <'creating an annotated tag with -m message should succeed'>)} { (SQ <'\n'> <'\tgit tag -m "A message" annotated-tag &&\n'> <'\tget_tag_msg annotated-tag >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(msgfile)} spids:[999]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ('Another message\n') ('in a file.\n'))} do_expansion: True here_end: EOF was_filled: True spids: [1002] ) ] ) (SimpleCommand words: [ {(get_tag_header)} {(file-annotated-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[1018])] ) (SimpleCommand words: [{(cat)} {(msgfile)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[1025])] ) (C {(test_expect_success)} {(SQ <'creating an annotated tag with -F messagefile should succeed'>)} { (SQ <'\n'> <'\tgit tag -F msgfile file-annotated-tag &&\n'> <'\tget_tag_msg file-annotated-tag >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(inputmsg)} spids:[1046]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ('A message from the\n') ('standard input\n'))} do_expansion: True here_end: EOF was_filled: True spids: [1049] ) ] ) (SimpleCommand words: [ {(get_tag_header)} {(stdin-annotated-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[1065])] ) (SimpleCommand words: [{(cat)} {(inputmsg)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[1072])] ) (C {(test_expect_success)} {(SQ <'creating an annotated tag with -F - should succeed'>)} { (SQ <'\n'> <'\tgit tag -F - stdin-annotated-tag <inputmsg &&\n'> <'\tget_tag_msg stdin-annotated-tag >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'trying to create a tag with a non-existing -F file should fail'>)} { (SQ <'\n'> <'\t! test -f nonexistingfile &&\n'> <'\t! tag_exists notag &&\n'> <'\ttest_must_fail git tag -F nonexistingfile notag &&\n'> <'\t! tag_exists notag\n'> ) } ) (C {(test_expect_success)} {(SQ <'trying to create tags giving both -m or -F options should fail'>)} { (SQ <'\n'> <'\techo "message file 1" >msgfile1 &&\n'> <'\techo "message file 2" >msgfile2 &&\n'> <'\t! tag_exists msgtag &&\n'> <'\ttest_must_fail git tag -m "message 1" -F msgfile1 msgtag &&\n'> <'\t! tag_exists msgtag &&\n'> <'\ttest_must_fail git tag -F msgfile1 -m "message 1" msgtag &&\n'> <'\t! tag_exists msgtag &&\n'> <'\ttest_must_fail git tag -m "message 1" -F msgfile1 \\\n'> <'\t\t-m "message 2" msgtag &&\n'> <'\t! tag_exists msgtag\n'> ) } ) (SimpleCommand words: [ {(get_tag_header)} {(empty-annotated-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[1143])] ) (C {(test_expect_success)} {(SQ <'creating a tag with an empty -m message should succeed'>)} { (SQ <'\n'> <'\tgit tag -m "" empty-annotated-tag &&\n'> <'\tget_tag_msg empty-annotated-tag >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (SimpleCommand redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(emptyfile)} spids:[1162])] ) (SimpleCommand words: [ {(get_tag_header)} {(emptyfile-annotated-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[1175])] ) (C {(test_expect_success)} {(SQ <'creating a tag with an empty -F messagefile should succeed'>)} { (SQ <'\n'> <'\tgit tag -F emptyfile emptyfile-annotated-tag &&\n'> <'\tget_tag_msg emptyfile-annotated-tag >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (SimpleCommand words: [{(printf)} {(SQ <'\\n\\n \\n\\t\\nLeading blank lines\\n'>)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(blanksfile)} spids:[1200])] ) (SimpleCommand words: [{(printf)} {(SQ <'\\n\\t \\t \\nRepeated blank lines\\n'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(blanksfile)} spids:[1209])] ) (SimpleCommand words: [{(printf)} {(SQ <'\\n\\n\\nTrailing spaces \\t \\n'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(blanksfile)} spids:[1218])] ) (SimpleCommand words: [{(printf)} {(SQ <'\\nTrailing blank lines\\n\\n\\t \\n\\n'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(blanksfile)} spids:[1227])] ) (SimpleCommand words: [ {(get_tag_header)} {(blanks-annotated-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[1240])] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[1245]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ('Leading blank lines\n') ('\n') ('Repeated blank lines\n') ('\n') ('Trailing spaces\n') ('\n') ('Trailing blank lines\n') ) } do_expansion: True here_end: EOF was_filled: True spids: [1248] ) ] ) (C {(test_expect_success)} {(SQ <'extra blanks in the message for an annotated tag should be removed'>)} { (SQ <'\n'> <'\tgit tag -F blanksfile blanks-annotated-tag &&\n'> <'\tget_tag_msg blanks-annotated-tag >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (SimpleCommand words: [ {(get_tag_header)} {(blank-annotated-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[1285])] ) (C {(test_expect_success)} {(SQ <'creating a tag with blank -m message with spaces should succeed'>)} { (SQ <'\n'> <'\tgit tag -m " " blank-annotated-tag &&\n'> <'\tget_tag_msg blank-annotated-tag >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (SimpleCommand words: [{(echo)} {(SQ <' '>)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(blankfile)} spids:[1310])] ) (SimpleCommand words: [{(echo)} {(SQ )}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(blankfile)} spids:[1318])] ) (SimpleCommand words: [{(echo)} {(SQ <' '>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(blankfile)} spids:[1327])] ) (SimpleCommand words: [ {(get_tag_header)} {(blankfile-annotated-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[1340])] ) (C {(test_expect_success)} {(SQ <'creating a tag with blank -F messagefile with spaces should succeed'>)} { (SQ <'\n'> <'\tgit tag -F blankfile blankfile-annotated-tag &&\n'> <'\tget_tag_msg blankfile-annotated-tag >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (SimpleCommand words: [{(printf)} {(SQ <' '>)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(blanknonlfile)} spids:[1365])] ) (SimpleCommand words: [ {(get_tag_header)} {(blanknonlfile-annotated-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[1378])] ) (C {(test_expect_success)} {(SQ <'creating a tag with -F file of spaces and no newline should succeed'>)} { (SQ <'\n'> <'\tgit tag -F blanknonlfile blanknonlfile-annotated-tag &&\n'> <'\tget_tag_msg blanknonlfile-annotated-tag >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(commentsfile)} spids:[1403]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ('# A comment\n') ('\n') ('############\n') ('The message.\n') ('############\n') ('One line.\n') ('\n') ('\n') ('# commented lines\n') ('# commented lines\n') ('\n') ('Another line.\n') ('# comments\n') ('\n') ('Last line.\n') ) } do_expansion: True here_end: EOF was_filled: True spids: [1406] ) ] ) (SimpleCommand words: [ {(get_tag_header)} {(comments-annotated-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[1435])] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[1440]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ('The message.\n') ('One line.\n') ('\n') ('Another line.\n') ('\n') ('Last line.\n')) } do_expansion: True here_end: EOF was_filled: True spids: [1443] ) ] ) (C {(test_expect_success)} {(SQ <'creating a tag using a -F messagefile with #comments should succeed'>)} { (SQ <'\n'> <'\tgit tag -F commentsfile comments-annotated-tag &&\n'> <'\tget_tag_msg comments-annotated-tag >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (SimpleCommand words: [ {(get_tag_header)} {(comment-annotated-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[1479])] ) (C {(test_expect_success)} {(SQ <'creating a tag with a #comment in the -m message should succeed'>)} { (SQ <'\n'> <'\tgit tag -m "#comment" comment-annotated-tag &&\n'> <'\tget_tag_msg comment-annotated-tag >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (SimpleCommand words: [{(echo)} {(SQ <'#comment'>)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(commentfile)} spids:[1504])] ) (SimpleCommand words: [{(echo)} {(SQ )}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(commentfile)} spids:[1512])] ) (SimpleCommand words: [{(echo)} {(SQ <'####'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(commentfile)} spids:[1521])] ) (SimpleCommand words: [ {(get_tag_header)} {(commentfile-annotated-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[1534])] ) (C {(test_expect_success)} {(SQ <'creating a tag with #comments in the -F messagefile should succeed'>)} { (SQ <'\n'> <'\tgit tag -F commentfile commentfile-annotated-tag &&\n'> <'\tget_tag_msg commentfile-annotated-tag >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (SimpleCommand words: [{(printf)} {(SQ <'#comment'>)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(commentnonlfile)} spids:[1559])] ) (SimpleCommand words: [ {(get_tag_header)} {(commentnonlfile-annotated-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[1572])] ) (C {(test_expect_success)} {(SQ <'creating a tag with a file of #comment and no newline should succeed'>)} { (SQ <'\n'> <'\tgit tag -F commentnonlfile commentnonlfile-annotated-tag &&\n'> <'\tget_tag_msg commentnonlfile-annotated-tag >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'listing the one-line message of a non-signed tag should succeed'>)} { (SQ <'\n'> <'\tgit tag -m "A msg" tag-one-line &&\n'> <'\n'> <'\techo "tag-one-line" >expect &&\n'> <'\tgit tag -l | grep "^tag-one-line" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n0 -l | grep "^tag-one-line" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n0 -l tag-one-line >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\n'> <'\techo "tag-one-line A msg" >expect &&\n'> <'\tgit tag -n1 -l | grep "^tag-one-line" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n -l | grep "^tag-one-line" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n1 -l tag-one-line >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n2 -l tag-one-line >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n999 -l tag-one-line >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'listing the zero-lines message of a non-signed tag should succeed'>)} { (SQ <'\n'> <'\tgit tag -m "" tag-zero-lines &&\n'> <'\n'> <'\techo "tag-zero-lines" >expect &&\n'> <'\tgit tag -l | grep "^tag-zero-lines" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n0 -l | grep "^tag-zero-lines" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n0 -l tag-zero-lines >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\n'> <'\techo "tag-zero-lines " >expect &&\n'> <'\tgit tag -n1 -l | grep "^tag-zero-lines" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n -l | grep "^tag-zero-lines" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n1 -l tag-zero-lines >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n2 -l tag-zero-lines >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n999 -l tag-zero-lines >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (SimpleCommand words: [{(echo)} {(SQ <'tag line one'>)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(annotagmsg)} spids:[1669])] ) (SimpleCommand words: [{(echo)} {(SQ <'tag line two'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(annotagmsg)} spids:[1678])] ) (SimpleCommand words: [{(echo)} {(SQ <'tag line three'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(annotagmsg)} spids:[1687])] ) (C {(test_expect_success)} {(SQ <'listing many message lines of a non-signed tag should succeed'>)} { (SQ <'\n'> <'\tgit tag -F annotagmsg tag-lines &&\n'> <'\n'> <'\techo "tag-lines" >expect &&\n'> <'\tgit tag -l | grep "^tag-lines" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n0 -l | grep "^tag-lines" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n0 -l tag-lines >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\n'> <'\techo "tag-lines tag line one" >expect &&\n'> <'\tgit tag -n1 -l | grep "^tag-lines" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n -l | grep "^tag-lines" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n1 -l tag-lines >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\n'> <'\techo " tag line two" >>expect &&\n'> <'\tgit tag -n2 -l | grep "^ *tag.line" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n2 -l tag-lines >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\n'> <'\techo " tag line three" >>expect &&\n'> <'\tgit tag -n3 -l | grep "^ *tag.line" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n3 -l tag-lines >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n4 -l | grep "^ *tag.line" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n4 -l tag-lines >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n99 -l | grep "^ *tag.line" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n99 -l tag-lines >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'annotations for blobs are empty'>)} { (SQ <'\n'> <'\tblob=$(git hash-object -w --stdin <<-\\EOF\n'> <'\tBlob paragraph 1.\n'> <'\n'> <'\tBlob paragraph 2.\n'> <'\tEOF\n'> <'\t) &&\n'> <'\tgit tag tag-blob $blob &&\n'> <'\techo "tag-blob " >expect &&\n'> <'\tgit tag -n1 -l tag-blob >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(GPG)} {(SQ <'trying to verify an annotated non-signed tag should fail'>)} {(SQ <'\n'> <'\ttag_exists annotated-tag &&\n'> <'\ttest_must_fail git tag -v annotated-tag\n'>)} ) (C {(test_expect_success)} {(GPG)} {(SQ <'trying to verify a file-annotated non-signed tag should fail'>)} { (SQ <'\n'> <'\ttag_exists file-annotated-tag &&\n'> <'\ttest_must_fail git tag -v file-annotated-tag\n'> ) } ) (C {(test_expect_success)} {(GPG)} {(SQ <'trying to verify two annotated non-signed tags should fail'>)} { (SQ <'\n'> <'\ttag_exists annotated-tag file-annotated-tag &&\n'> <'\ttest_must_fail git tag -v annotated-tag file-annotated-tag\n'> ) } ) (SimpleCommand words: [ {(get_tag_header)} {(signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[1830])] ) (SimpleCommand words: [{(echo)} {(SQ <'A signed tag message'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[1839])] ) (SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[1848])] ) (C {(test_expect_success)} {(GPG)} {(SQ <'creating a signed tag with -m message should succeed'>)} { (SQ <'\n'> <'\tgit tag -s -m "A signed tag message" signed-tag &&\n'> <'\tget_tag_msg signed-tag >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (SimpleCommand words: [ {(get_tag_header)} {(u-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[1877])] ) (SimpleCommand words: [{(echo)} {(SQ <'Another message'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[1886])] ) (SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[1895])] ) (C {(test_expect_success)} {(GPG)} {(SQ <'sign with a given key id'>)} { (SQ <'\n'> <'\n'> <'\tgit tag -u committer@example.com -m "Another message" u-signed-tag &&\n'> <'\tget_tag_msg u-signed-tag >actual &&\n'> <'\ttest_cmp expect actual\n'> <'\n'> ) } ) (C {(test_expect_success)} {(GPG)} {(SQ <'sign with an unknown id (1)'>)} { (SQ <'\n'> <'\n'> <'\ttest_must_fail git tag -u author@example.com \\\n'> <'\t\t-m "Another message" o-signed-tag\n'> <'\n'> ) } ) (C {(test_expect_success)} {(GPG)} {(SQ <'sign with an unknown id (2)'>)} { (SQ <'\n'> <'\n'> <'\ttest_must_fail git tag -u DEADBEEF -m "Another message" o-signed-tag\n'> <'\n'> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(fakeeditor)} spids:[1951]) (HereDoc op_id: Redir_DLess fd: -1 body: {('#!/bin/sh\n') ('test -n "$1" && exec >"$1"\n') ('echo A signed tag message\n') ('echo from a fake editor.\n') } do_expansion: False here_end: EOF was_filled: True spids: [1954] ) ] ) (C {(chmod)} {(Lit_Other '+') (x)} {(fakeeditor)}) (SimpleCommand words: [ {(get_tag_header)} {(implied-sign)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[1977])] ) (SimpleCommand words: [{(./fakeeditor)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[1982])] ) (SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[1991])] ) (C {(test_expect_success)} {(GPG)} {(SQ <'-u implies signed tag'>)} { (SQ <'\n'> <'\tGIT_EDITOR=./fakeeditor git tag -u CDDE430D implied-sign &&\n'> <'\tget_tag_msg implied-sign >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(sigmsgfile)} spids:[2012]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ('Another signed tag\n') ('message in a file.\n'))} do_expansion: True here_end: EOF was_filled: True spids: [2015] ) ] ) (SimpleCommand words: [ {(get_tag_header)} {(file-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[2031])] ) (SimpleCommand words: [{(cat)} {(sigmsgfile)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[2038])] ) (SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[2047])] ) (C {(test_expect_success)} {(GPG)} {(SQ <'creating a signed tag with -F messagefile should succeed'>)} { (SQ <'\n'> <'\tgit tag -s -F sigmsgfile file-signed-tag &&\n'> <'\tget_tag_msg file-signed-tag >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(siginputmsg)} spids:[2070]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ('A signed tag message from\n') ('the standard input\n'))} do_expansion: True here_end: EOF was_filled: True spids: [2073] ) ] ) (SimpleCommand words: [ {(get_tag_header)} {(stdin-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[2089])] ) (SimpleCommand words: [{(cat)} {(siginputmsg)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[2096])] ) (SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[2105])] ) (C {(test_expect_success)} {(GPG)} {(SQ <'creating a signed tag with -F - should succeed'>)} { (SQ <'\n'> <'\tgit tag -s -F - stdin-signed-tag <siginputmsg &&\n'> <'\tget_tag_msg stdin-signed-tag >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (SimpleCommand words: [ {(get_tag_header)} {(implied-annotate)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[2134])] ) (SimpleCommand words: [{(./fakeeditor)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[2139])] ) (SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[2148])] ) (C {(test_expect_success)} {(GPG)} {(SQ <'-s implies annotated tag'>)} { (SQ <'\n'> <'\tGIT_EDITOR=./fakeeditor git tag -s implied-annotate &&\n'> <'\tget_tag_msg implied-annotate >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (SimpleCommand words: [ {(get_tag_header)} {(forcesignannotated-implied-sign)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[2177])] ) (SimpleCommand words: [{(echo)} {(DQ ('A message'))}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[2186])] ) (SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[2195])] ) (C {(test_expect_success)} {(GPG)} {(SQ <'git tag -s implied if configured with tag.forcesignannotated'>)} { (SQ <'test_config tag.forcesignannotated true &&\n'> <'\tgit tag -m "A message" forcesignannotated-implied-sign &&\n'> <'\tget_tag_msg forcesignannotated-implied-sign >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(GPG)} {(SQ <'lightweight with no message when configured with tag.forcesignannotated'>)} { (SQ <'test_config tag.forcesignannotated true &&\n'> <'\tgit tag forcesignannotated-lightweight &&\n'> <'\ttag_exists forcesignannotated-lightweight &&\n'> <'\ttest_must_fail git tag -v forcesignannotated-no-message\n'> ) } ) (SimpleCommand words: [ {(get_tag_header)} {(forcesignannotated-annotate)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[2248])] ) (SimpleCommand words: [{(echo)} {(DQ ('A message'))}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[2257])] ) (C {(test_expect_success)} {(GPG)} {(SQ <'git tag -a disable configured tag.forcesignannotated'>)} { (SQ <'test_config tag.forcesignannotated true &&\n'> <'\tgit tag -a -m "A message" forcesignannotated-annotate &&\n'> <'\tget_tag_msg forcesignannotated-annotate >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\ttest_must_fail git tag -v forcesignannotated-annotate\n'> ) } ) (SimpleCommand words: [ {(get_tag_header)} {(forcesignannotated-disabled)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[2291])] ) (SimpleCommand words: [{(echo)} {(DQ ('A message'))}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[2300])] ) (SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[2309])] ) (C {(test_expect_success)} {(GPG)} {(SQ <'git tag --sign enable GPG sign'>)} { (SQ <'test_config tag.forcesignannotated false &&\n'> <'\tgit tag --sign -m "A message" forcesignannotated-disabled &&\n'> <'\tget_tag_msg forcesignannotated-disabled >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(GPG)} {(SQ <'trying to create a signed tag with non-existing -F file should fail'>)} { (SQ <'\n'> <'\t! test -f nonexistingfile &&\n'> <'\t! tag_exists nosigtag &&\n'> <'\ttest_must_fail git tag -s -F nonexistingfile nosigtag &&\n'> <'\t! tag_exists nosigtag\n'> ) } ) (C {(test_expect_success)} {(GPG)} {(SQ <'verifying a signed tag should succeed'>)} {(SQ <'git tag -v signed-tag'>)} ) (C {(test_expect_success)} {(GPG)} {(SQ <'verifying two signed tags in one command should succeed'>)} {(SQ <'git tag -v signed-tag file-signed-tag'>)} ) (C {(test_expect_success)} {(GPG)} {(SQ <'verifying many signed and non-signed tags should fail'>)} { (SQ <'\n'> <'\ttest_must_fail git tag -v signed-tag annotated-tag &&\n'> <'\ttest_must_fail git tag -v file-annotated-tag file-signed-tag &&\n'> <'\ttest_must_fail git tag -v annotated-tag \\\n'> <'\t\tfile-signed-tag file-annotated-tag &&\n'> <'\ttest_must_fail git tag -v signed-tag annotated-tag file-signed-tag\n'> ) } ) (C {(test_expect_success)} {(GPG)} {(SQ <'verifying a forged tag should fail'>)} { (SQ <'\n'> <'\tforged=$(git cat-file tag signed-tag |\n'> <'\t\tsed -e "s/signed-tag/forged-tag/" |\n'> <'\t\tgit mktag) &&\n'> <'\tgit tag forged-tag $forged &&\n'> <'\ttest_must_fail git tag -v forged-tag\n'> ) } ) (SimpleCommand words: [ {(get_tag_header)} {(empty-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[2433])] ) (SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[2442])] ) (C {(test_expect_success)} {(GPG)} {(SQ <'creating a signed tag with an empty -m message should succeed'>)} { (SQ <'\n'> <'\tgit tag -s -m "" empty-signed-tag &&\n'> <'\tget_tag_msg empty-signed-tag >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -v empty-signed-tag\n'> ) } ) (SimpleCommand redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(sigemptyfile)} spids:[2464])] ) (SimpleCommand words: [ {(get_tag_header)} {(emptyfile-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[2477])] ) (SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[2486])] ) (C {(test_expect_success)} {(GPG)} {(SQ <'creating a signed tag with an empty -F messagefile should succeed'>)} { (SQ <'\n'> <'\tgit tag -s -F sigemptyfile emptyfile-signed-tag &&\n'> <'\tget_tag_msg emptyfile-signed-tag >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -v emptyfile-signed-tag\n'> ) } ) (SimpleCommand words: [{(printf)} {(SQ <'\\n\\n \\n\\t\\nLeading blank lines\\n'>)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(sigblanksfile)} spids:[2514])] ) (SimpleCommand words: [{(printf)} {(SQ <'\\n\\t \\t \\nRepeated blank lines\\n'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(sigblanksfile)} spids:[2524])] ) (SimpleCommand words: [{(printf)} {(SQ <'\\n\\n\\nTrailing spaces \\t \\n'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(sigblanksfile)} spids:[2533])] ) (SimpleCommand words: [{(printf)} {(SQ <'\\nTrailing blank lines\\n\\n\\t \\n\\n'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(sigblanksfile)} spids:[2542])] ) (SimpleCommand words: [ {(get_tag_header)} {(blanks-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[2555])] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[2560]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ('Leading blank lines\n') ('\n') ('Repeated blank lines\n') ('\n') ('Trailing spaces\n') ('\n') ('Trailing blank lines\n') ) } do_expansion: True here_end: EOF was_filled: True spids: [2563] ) ] ) (SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[2580])] ) (C {(test_expect_success)} {(GPG)} {(SQ <'extra blanks in the message for a signed tag should be removed'>)} { (SQ <'\n'> <'\tgit tag -s -F sigblanksfile blanks-signed-tag &&\n'> <'\tget_tag_msg blanks-signed-tag >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -v blanks-signed-tag\n'> ) } ) (SimpleCommand words: [ {(get_tag_header)} {(blank-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[2612])] ) (SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[2621])] ) (C {(test_expect_success)} {(GPG)} {(SQ <'creating a signed tag with a blank -m message should succeed'>)} { (SQ <'\n'> <'\tgit tag -s -m " " blank-signed-tag &&\n'> <'\tget_tag_msg blank-signed-tag >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -v blank-signed-tag\n'> ) } ) (SimpleCommand words: [{(echo)} {(SQ <' '>)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(sigblankfile)} spids:[2649])] ) (SimpleCommand words: [{(echo)} {(SQ )}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(sigblankfile)} spids:[2657])] ) (SimpleCommand words: [{(echo)} {(SQ <' '>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(sigblankfile)} spids:[2666])] ) (SimpleCommand words: [ {(get_tag_header)} {(blankfile-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[2679])] ) (SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[2688])] ) (C {(test_expect_success)} {(GPG)} {(SQ <'creating a signed tag with blank -F file with spaces should succeed'>)} { (SQ <'\n'> <'\tgit tag -s -F sigblankfile blankfile-signed-tag &&\n'> <'\tget_tag_msg blankfile-signed-tag >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -v blankfile-signed-tag\n'> ) } ) (SimpleCommand words: [{(printf)} {(SQ <' '>)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(sigblanknonlfile)} spids:[2716])] ) (SimpleCommand words: [ {(get_tag_header)} {(blanknonlfile-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[2729])] ) (SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[2738])] ) (C {(test_expect_success)} {(GPG)} {(SQ <'creating a signed tag with spaces and no newline should succeed'>)} { (SQ <'\n'> <'\tgit tag -s -F sigblanknonlfile blanknonlfile-signed-tag &&\n'> <'\tget_tag_msg blanknonlfile-signed-tag >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -v signed-tag\n'> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(sigcommentsfile)} spids:[2766]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ('# A comment\n') ('\n') ('############\n') ('The message.\n') ('############\n') ('One line.\n') ('\n') ('\n') ('# commented lines\n') ('# commented lines\n') ('\n') ('Another line.\n') ('# comments\n') ('\n') ('Last line.\n') ) } do_expansion: True here_end: EOF was_filled: True spids: [2769] ) ] ) (SimpleCommand words: [ {(get_tag_header)} {(comments-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[2798])] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[2803]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ('The message.\n') ('One line.\n') ('\n') ('Another line.\n') ('\n') ('Last line.\n')) } do_expansion: True here_end: EOF was_filled: True spids: [2806] ) ] ) (SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[2822])] ) (C {(test_expect_success)} {(GPG)} {(SQ <'creating a signed tag with a -F file with #comments should succeed'>)} { (SQ <'\n'> <'\tgit tag -s -F sigcommentsfile comments-signed-tag &&\n'> <'\tget_tag_msg comments-signed-tag >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -v comments-signed-tag\n'> ) } ) (SimpleCommand words: [ {(get_tag_header)} {(comment-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[2854])] ) (SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[2863])] ) (C {(test_expect_success)} {(GPG)} {(SQ <'creating a signed tag with #commented -m message should succeed'>)} { (SQ <'\n'> <'\tgit tag -s -m "#comment" comment-signed-tag &&\n'> <'\tget_tag_msg comment-signed-tag >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -v comment-signed-tag\n'> ) } ) (SimpleCommand words: [{(echo)} {(SQ <'#comment'>)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(sigcommentfile)} spids:[2891])] ) (SimpleCommand words: [{(echo)} {(SQ )}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(sigcommentfile)} spids:[2899])] ) (SimpleCommand words: [{(echo)} {(SQ <'####'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(sigcommentfile)} spids:[2908])] ) (SimpleCommand words: [ {(get_tag_header)} {(commentfile-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[2921])] ) (SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[2930])] ) (C {(test_expect_success)} {(GPG)} {(SQ <'creating a signed tag with #commented -F messagefile should succeed'>)} { (SQ <'\n'> <'\tgit tag -s -F sigcommentfile commentfile-signed-tag &&\n'> <'\tget_tag_msg commentfile-signed-tag >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -v commentfile-signed-tag\n'> ) } ) (SimpleCommand words: [{(printf)} {(SQ <'#comment'>)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(sigcommentnonlfile)} spids:[2958])] ) (SimpleCommand words: [ {(get_tag_header)} {(commentnonlfile-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[2971])] ) (SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[2980])] ) (C {(test_expect_success)} {(GPG)} {(SQ <'creating a signed tag with a #comment and no newline should succeed'>)} { (SQ <'\n'> <'\tgit tag -s -F sigcommentnonlfile commentnonlfile-signed-tag &&\n'> <'\tget_tag_msg commentnonlfile-signed-tag >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -v commentnonlfile-signed-tag\n'> ) } ) (C {(test_expect_success)} {(GPG)} {(SQ <'listing the one-line message of a signed tag should succeed'>)} { (SQ <'\n'> <'\tgit tag -s -m "A message line signed" stag-one-line &&\n'> <'\n'> <'\techo "stag-one-line" >expect &&\n'> <'\tgit tag -l | grep "^stag-one-line" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n0 -l | grep "^stag-one-line" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n0 -l stag-one-line >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\n'> <'\techo "stag-one-line A message line signed" >expect &&\n'> <'\tgit tag -n1 -l | grep "^stag-one-line" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n -l | grep "^stag-one-line" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n1 -l stag-one-line >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n2 -l stag-one-line >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n999 -l stag-one-line >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(GPG)} {(SQ <'listing the zero-lines message of a signed tag should succeed'>)} { (SQ <'\n'> <'\tgit tag -s -m "" stag-zero-lines &&\n'> <'\n'> <'\techo "stag-zero-lines" >expect &&\n'> <'\tgit tag -l | grep "^stag-zero-lines" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n0 -l | grep "^stag-zero-lines" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n0 -l stag-zero-lines >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\n'> <'\techo "stag-zero-lines " >expect &&\n'> <'\tgit tag -n1 -l | grep "^stag-zero-lines" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n -l | grep "^stag-zero-lines" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n1 -l stag-zero-lines >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n2 -l stag-zero-lines >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n999 -l stag-zero-lines >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (SimpleCommand words: [{(echo)} {(SQ <'stag line one'>)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(sigtagmsg)} spids:[3084])] ) (SimpleCommand words: [{(echo)} {(SQ <'stag line two'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(sigtagmsg)} spids:[3093])] ) (SimpleCommand words: [{(echo)} {(SQ <'stag line three'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(sigtagmsg)} spids:[3102])] ) (C {(test_expect_success)} {(GPG)} {(SQ <'listing many message lines of a signed tag should succeed'>)} { (SQ <'\n'> <'\tgit tag -s -F sigtagmsg stag-lines &&\n'> <'\n'> <'\techo "stag-lines" >expect &&\n'> <'\tgit tag -l | grep "^stag-lines" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n0 -l | grep "^stag-lines" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n0 -l stag-lines >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\n'> <'\techo "stag-lines stag line one" >expect &&\n'> <'\tgit tag -n1 -l | grep "^stag-lines" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n -l | grep "^stag-lines" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n1 -l stag-lines >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\n'> <'\techo " stag line two" >>expect &&\n'> <'\tgit tag -n2 -l | grep "^ *stag.line" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n2 -l stag-lines >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\n'> <'\techo " stag line three" >>expect &&\n'> <'\tgit tag -n3 -l | grep "^ *stag.line" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n3 -l stag-lines >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n4 -l | grep "^ *stag.line" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n4 -l stag-lines >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n99 -l | grep "^ *stag.line" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -n99 -l stag-lines >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tree) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(git)} {(rev-parse)} {(HEAD) (Lit_Other '^') (Lit_LBrace '{') (tree) (Lit_RBrace '}')} ) ] ) left_token: <Left_CommandSub '$('> spids: [3162 3172] ) } spids: [3161] ) ] spids: [3161] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:blob) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(git)} {(rev-parse)} {(HEAD) (Lit_Other ':') (foo)})] ) left_token: <Left_CommandSub '$('> spids: [3175 3183] ) } spids: [3174] ) ] spids: [3174] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tag) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (SimpleCommand words: [{(git)} {(rev-parse)} {(signed-tag)}] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [3193] ) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [3186 3195] ) } spids: [3185] ) ] spids: [3185] ) (SimpleCommand words: [ {(get_tag_header)} {(tree-signed-tag)} {($ VSub_Name '$tree')} {(tree)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[3208])] ) (SimpleCommand words: [{(echo)} {(DQ ('A message for a tree'))}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[3217])] ) (SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[3226])] ) (C {(test_expect_success)} {(GPG)} {(SQ <'creating a signed tag pointing to a tree should succeed'>)} { (SQ <'\n'> <'\tgit tag -s -m "A message for a tree" tree-signed-tag HEAD^{tree} &&\n'> <'\tget_tag_msg tree-signed-tag >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (SimpleCommand words: [ {(get_tag_header)} {(blob-signed-tag)} {($ VSub_Name '$blob')} {(blob)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[3257])] ) (SimpleCommand words: [{(echo)} {(DQ ('A message for a blob'))}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[3266])] ) (SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[3275])] ) (C {(test_expect_success)} {(GPG)} {(SQ <'creating a signed tag pointing to a blob should succeed'>)} { (SQ <'\n'> <'\tgit tag -s -m "A message for a blob" blob-signed-tag HEAD:foo &&\n'> <'\tget_tag_msg blob-signed-tag >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (SimpleCommand words: [{(get_tag_header)} {(tag-signed-tag)} {($ VSub_Name '$tag')} {(tag)} {($ VSub_Name '$time')}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[3306])] ) (SimpleCommand words: [{(echo)} {(DQ ('A message for another tag'))}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[3315])] ) (SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[3324])] ) (C {(test_expect_success)} {(GPG)} {(SQ <'creating a signed tag pointing to another tag should succeed'>)} { (SQ <'\n'> <'\tgit tag -s -m "A message for another tag" tag-signed-tag signed-tag &&\n'> <'\tget_tag_msg tag-signed-tag >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (SimpleCommand words: [ {(get_tag_header)} {(rfc1991-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[3358])] ) (SimpleCommand words: [{(echo)} {(DQ ('RFC1991 signed tag'))}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[3367])] ) (SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP MESSAGE-----'>)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[3376])] ) (C {(test_expect_success)} {(GPG) (Lit_Comma ',') (RFC1991)} {(SQ <'creating a signed tag with rfc1991'>)} { (SQ <'\n'> <'\techo "rfc1991" >gpghome/gpg.conf &&\n'> <'\tgit tag -s -m "RFC1991 signed tag" rfc1991-signed-tag $commit &&\n'> <'\tget_tag_msg rfc1991-signed-tag >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(fakeeditor)} spids:[3402]) (HereDoc op_id: Redir_DLess fd: -1 body: {('#!/bin/sh\n') ('cp "$1" actual\n')} do_expansion: False here_end: EOF was_filled: True spids: [3405] ) ] ) (C {(chmod)} {(Lit_Other '+') (x)} {(fakeeditor)}) (C {(test_expect_success)} {(GPG) (Lit_Comma ',') (RFC1991)} {(SQ <'reediting a signed tag body omits signature'>)} { (SQ <'\n'> <'\techo "rfc1991" >gpghome/gpg.conf &&\n'> <'\techo "RFC1991 signed tag" >expect &&\n'> <'\tGIT_EDITOR=./fakeeditor git tag -f -s rfc1991-signed-tag $commit &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(GPG) (Lit_Comma ',') (RFC1991)} {(SQ <'verifying rfc1991 signature'>)} {(SQ <'\n'> <'\techo "rfc1991" >gpghome/gpg.conf &&\n'> <'\tgit tag -v rfc1991-signed-tag\n'>)} ) (C {(test_expect_success)} {(GPG) (Lit_Comma ',') (RFC1991)} {(SQ <'list tag with rfc1991 signature'>)} { (SQ <'\n'> <'\techo "rfc1991" >gpghome/gpg.conf &&\n'> <'\techo "rfc1991-signed-tag RFC1991 signed tag" >expect &&\n'> <'\tgit tag -l -n1 rfc1991-signed-tag >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -l -n2 rfc1991-signed-tag >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -l -n999 rfc1991-signed-tag >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(rm)} {(-f)} {(gpghome/gpg.conf)}) (C {(test_expect_success)} {(GPG) (Lit_Comma ',') (RFC1991)} {(SQ <'verifying rfc1991 signature without --rfc1991'>)} {(SQ <'\n'> <'\tgit tag -v rfc1991-signed-tag\n'>)} ) (C {(test_expect_success)} {(GPG) (Lit_Comma ',') (RFC1991)} {(SQ <'list tag with rfc1991 signature without --rfc1991'>)} { (SQ <'\n'> <'\techo "rfc1991-signed-tag RFC1991 signed tag" >expect &&\n'> <'\tgit tag -l -n1 rfc1991-signed-tag >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -l -n2 rfc1991-signed-tag >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\tgit tag -l -n999 rfc1991-signed-tag >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(GPG) (Lit_Comma ',') (RFC1991)} {(SQ <'reediting a signed tag body omits signature'>)} { (SQ <'\n'> <'\techo "RFC1991 signed tag" >expect &&\n'> <'\tGIT_EDITOR=./fakeeditor git tag -f -s rfc1991-signed-tag $commit &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(git)} {(config)} {(user.signingkey)} {(BobTheMouse)}) (C {(test_expect_success)} {(GPG)} {(SQ <'git tag -s fails if gpg is misconfigured (bad key)'>)} {(SQ <'test_must_fail git tag -s -m tail tag-gpg-failure'>)} ) (C {(git)} {(config)} {(--unset)} {(user.signingkey)}) (C {(test_expect_success)} {(GPG)} {(SQ <'git tag -s fails if gpg is misconfigured (bad signature format)'>)} {(SQ <'test_config gpg.program echo &&\n'> <'\t test_must_fail git tag -s -m tail tag-gpg-failure'>)} ) (C {(rm)} {(-rf)} {(gpghome)}) (C {(test_expect_success)} {(GPG)} {(SQ <'verify signed tag fails when public key is not present'>)} {(SQ <'test_must_fail git tag -v signed-tag'>)} ) (C {(test_expect_success)} {(SQ <'git tag -a fails if tag annotation is empty'>)} {(SQ <'\n'> <'\t! (GIT_EDITOR=cat git tag -a initial-comment)\n'>)} ) (C {(test_expect_success)} {(SQ <'message in editor has initial comment'>)} {(SQ <'\n'> <'\t! (GIT_EDITOR=cat git tag -a initial-comment > actual)\n'>)} ) (C {(test_expect_success)} {(SQ <'message in editor has initial comment: first line'>)} { (SQ <'\n'> <'\t# check the first line --- should be empty\n'> <'\techo >first.expect &&\n'> <'\tsed -e 1q <actual >first.actual &&\n'> <'\ttest_i18ncmp first.expect first.actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'message in editor has initial comment: remainder'>)} { (SQ <'\n'> <'\t# remove commented lines from the remainder -- should be empty\n'> <'\t>rest.expect &&\n'> <'\tsed -e 1d -e "/^#/d" <actual >rest.actual &&\n'> <'\ttest_cmp rest.expect rest.actual\n'> ) } ) (SimpleCommand words: [{(get_tag_header)} {(reuse)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[3707])] ) (SimpleCommand words: [{(echo)} {(DQ ('An annotation to be reused'))}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect)} spids:[3716])] ) (C {(test_expect_success)} {(SQ <'overwriting an annoted tag should use its previous body'>)} { (SQ <'\n'> <'\tgit tag -a -m "An annotation to be reused" reuse &&\n'> <'\tGIT_EDITOR=true git tag -f -a reuse &&\n'> <'\tget_tag_msg reuse >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'filename for the message is relative to cwd'>)} { (SQ <'\n'> <'\tmkdir subdir &&\n'> <'\techo "Tag message in top directory" >msgfile-5 &&\n'> <'\techo "Tag message in sub directory" >subdir/msgfile-5 &&\n'> <'\t(\n'> <'\t\tcd subdir &&\n'> <'\t\tgit tag -a -F msgfile-5 tag-from-subdir\n'> <'\t) &&\n'> <'\tgit cat-file tag tag-from-subdir | grep "in sub directory"\n'> ) } ) (C {(test_expect_success)} {(SQ <'filename for the message is relative to cwd'>)} { (SQ <'\n'> <'\techo "Tag message in sub directory" >subdir/msgfile-6 &&\n'> <'\t(\n'> <'\t\tcd subdir &&\n'> <'\t\tgit tag -a -F msgfile-6 tag-from-subdir-2\n'> <'\t) &&\n'> <'\tgit cat-file tag tag-from-subdir-2 | grep "in sub directory"\n'> ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:hash1) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(git)} {(rev-parse)} {(HEAD)})]) left_token: <Left_CommandSub '$('> spids: [3778 3784] ) } spids: [3777] ) ] spids: [3777] ) (C {(test_expect_success)} {(SQ <'creating second commit and tag'>)} { (SQ <'\n'> <'\techo foo-2.0 >foo &&\n'> <'\tgit add foo &&\n'> <'\tgit commit -m second &&\n'> <'\tgit tag v2.0\n'> ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:hash2) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(git)} {(rev-parse)} {(HEAD)})]) left_token: <Left_CommandSub '$('> spids: [3803 3809] ) } spids: [3802] ) ] spids: [3802] ) (C {(test_expect_success)} {(SQ <'creating third commit without tag'>)} {(SQ <'\n'> <'\techo foo-dev >foo &&\n'> <'\tgit add foo &&\n'> <'\tgit commit -m third\n'>)} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:hash3) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(git)} {(rev-parse)} {(HEAD)})]) left_token: <Left_CommandSub '$('> spids: [3827 3833] ) } spids: [3826] ) ] spids: [3826] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expected)} spids:[3842]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ('v0.2.1\n') ('v1.0\n') ('v1.0.1\n') ('v1.1.3\n') ('v2.0\n'))} do_expansion: True here_end: EOF was_filled: True spids: [3846] ) ] ) (C {(test_expect_success)} {(SQ <'checking that first commit is in all tags (hash)'>)} { (DQ ('\n') ('\tgit tag -l --contains ') ($ VSub_Name '$hash1') (' v* >actual &&\n') ('\ttest_cmp expected actual\n') ) } ) (C {(test_expect_success)} {(SQ <'checking that first commit is in all tags (tag)'>)} {(DQ ('\n') ('\tgit tag -l --contains v1.0 v* >actual &&\n') ('\ttest_cmp expected actual\n'))} ) (C {(test_expect_success)} {(SQ <'checking that first commit is in all tags (relative)'>)} { (DQ ('\n') ('\tgit tag -l --contains HEAD~2 v* >actual &&\n') ('\ttest_cmp expected actual\n')) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expected)} spids:[3902]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ('v2.0\n'))} do_expansion: True here_end: EOF was_filled: True spids: [3906] ) ] ) (C {(test_expect_success)} {(SQ <'checking that second commit only has one tag'>)} { (DQ ('\n') ('\tgit tag -l --contains ') ($ VSub_Name '$hash2') (' v* >actual &&\n') ('\ttest_cmp expected actual\n') ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expected)} spids:[3930]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ )} do_expansion: True here_end: EOF was_filled: True spids: [3934] ) ] ) (C {(test_expect_success)} {(SQ <'checking that third commit has no tags'>)} { (DQ ('\n') ('\tgit tag -l --contains ') ($ VSub_Name '$hash3') (' v* >actual &&\n') ('\ttest_cmp expected actual\n') ) } ) (C {(test_expect_success)} {(SQ <'creating simple branch'>)} { (SQ <'\n'> <'\tgit branch stable v2.0 &&\n'> <' git checkout stable &&\n'> <'\techo foo-3.0 > foo &&\n'> <'\tgit commit foo -m fourth &&\n'> <'\tgit tag v3.0\n'> ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:hash4) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(git)} {(rev-parse)} {(HEAD)})]) left_token: <Left_CommandSub '$('> spids: [3975 3981] ) } spids: [3974] ) ] spids: [3974] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expected)} spids:[3986]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ('v3.0\n'))} do_expansion: True here_end: EOF was_filled: True spids: [3990] ) ] ) (C {(test_expect_success)} {(SQ <'checking that branch head only has one tag'>)} { (DQ ('\n') ('\tgit tag -l --contains ') ($ VSub_Name '$hash4') (' v* >actual &&\n') ('\ttest_cmp expected actual\n') ) } ) (C {(test_expect_success)} {(SQ <'merging original branch into this branch'>)} {(SQ <'\n'> <'\tgit merge --strategy=ours master &&\n'> <' git tag v4.0\n'>)} ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expected)} spids:[4026]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ('v4.0\n'))} do_expansion: True here_end: EOF was_filled: True spids: [4030] ) ] ) (C {(test_expect_success)} {(SQ <'checking that original branch head has one tag now'>)} { (DQ ('\n') ('\tgit tag -l --contains ') ($ VSub_Name '$hash3') (' v* >actual &&\n') ('\ttest_cmp expected actual\n') ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expected)} spids:[4053]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ('v0.2.1\n') ('v1.0\n') ('v1.0.1\n') ('v1.1.3\n') ('v2.0\n') ('v3.0\n') ('v4.0\n'))} do_expansion: True here_end: EOF was_filled: True spids: [4057] ) ] ) (C {(test_expect_success)} {(SQ <'checking that initial commit is in all tags'>)} { (DQ ('\n') ('\tgit tag -l --contains ') ($ VSub_Name '$hash1') (' v* >actual &&\n') ('\ttest_cmp expected actual\n') ) } ) (C {(test_expect_success)} {(SQ <'mixing incompatibles modes and options is forbidden'>)} { (SQ <'\n'> <'\ttest_must_fail git tag -a &&\n'> <'\ttest_must_fail git tag -l -v &&\n'> <'\ttest_must_fail git tag -n 100 &&\n'> <'\ttest_must_fail git tag -l -m msg &&\n'> <'\ttest_must_fail git tag -l -F some file &&\n'> <'\ttest_must_fail git tag -v -s\n'> ) } ) (C {(test_expect_success)} {(SQ <'--points-at cannot be used in non-list mode'>)} {(SQ <'\n'> <'\ttest_must_fail git tag --points-at=v4.0 foo\n'>)} ) (C {(test_expect_success)} {(SQ <'--points-at finds lightweight tags'>)} { (SQ <'\n'> <'\techo v4.0 >expect &&\n'> <'\tgit tag --points-at v4.0 >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'--points-at finds annotated tags of commits'>)} { (SQ <'\n'> <'\tgit tag -m "v4.0, annotated" annotated-v4.0 v4.0 &&\n'> <'\techo annotated-v4.0 >expect &&\n'> <'\tgit tag -l --points-at v4.0 "annotated*" >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'--points-at finds annotated tags of tags'>)} { (SQ <'\n'> <'\tgit tag -m "describing the v4.0 tag object" \\\n'> <'\t\tannotated-again-v4.0 annotated-v4.0 &&\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\tannotated-again-v4.0\n'> <'\tannotated-v4.0\n'> <'\tEOF\n'> <'\tgit tag --points-at=annotated-v4.0 >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'multiple --points-at are OR-ed together'>)} { (SQ <'\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\tv2.0\n'> <'\tv3.0\n'> <'\tEOF\n'> <'\tgit tag --points-at=v2.0 --points-at=v3.0 >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'lexical sort'>)} { (SQ <'\n'> <'\tgit tag foo1.3 &&\n'> <'\tgit tag foo1.6 &&\n'> <'\tgit tag foo1.10 &&\n'> <'\tgit tag -l --sort=refname "foo*" >actual &&\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\tfoo1.10\n'> <'\tfoo1.3\n'> <'\tfoo1.6\n'> <'\tEOF\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'version sort'>)} { (SQ <'\n'> <'\tgit tag -l --sort=version:refname "foo*" >actual &&\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\tfoo1.3\n'> <'\tfoo1.6\n'> <'\tfoo1.10\n'> <'\tEOF\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'reverse version sort'>)} { (SQ <'\n'> <'\tgit tag -l --sort=-version:refname "foo*" >actual &&\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\tfoo1.10\n'> <'\tfoo1.6\n'> <'\tfoo1.3\n'> <'\tEOF\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'reverse lexical sort'>)} { (SQ <'\n'> <'\tgit tag -l --sort=-refname "foo*" >actual &&\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\tfoo1.6\n'> <'\tfoo1.3\n'> <'\tfoo1.10\n'> <'\tEOF\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'configured lexical sort'>)} { (SQ <'\n'> <'\tgit config tag.sort "v:refname" &&\n'> <'\tgit tag -l "foo*" >actual &&\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\tfoo1.3\n'> <'\tfoo1.6\n'> <'\tfoo1.10\n'> <'\tEOF\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'option override configured sort'>)} { (SQ <'\n'> <'\tgit tag -l --sort=-refname "foo*" >actual &&\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\tfoo1.6\n'> <'\tfoo1.3\n'> <'\tfoo1.10\n'> <'\tEOF\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'invalid sort parameter on command line'>)} {(SQ <'\n'> <'\ttest_must_fail git tag -l --sort=notvalid "foo*" >actual\n'>)} ) (C {(test_expect_success)} {(SQ <'invalid sort parameter in configuratoin'>)} { (SQ <'\n'> <'\tgit config tag.sort "v:notvalid" &&\n'> <'\ttest_must_fail git tag -l "foo*"\n'>) } ) (C {(test_expect_success)} {(SQ <'version sort with prerelease reordering'>)} { (SQ <'\n'> <'\tgit config --unset tag.sort &&\n'> <'\tgit config versionsort.prereleaseSuffix -rc &&\n'> <'\tgit tag foo1.6-rc1 &&\n'> <'\tgit tag foo1.6-rc2 &&\n'> <'\tgit tag -l --sort=version:refname "foo*" >actual &&\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\tfoo1.3\n'> <'\tfoo1.6-rc1\n'> <'\tfoo1.6-rc2\n'> <'\tfoo1.6\n'> <'\tfoo1.10\n'> <'\tEOF\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'reverse version sort with prerelease reordering'>)} { (SQ <'\n'> <'\tgit tag -l --sort=-version:refname "foo*" >actual &&\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\tfoo1.10\n'> <'\tfoo1.6\n'> <'\tfoo1.6-rc2\n'> <'\tfoo1.6-rc1\n'> <'\tfoo1.3\n'> <'\tEOF\n'> <'\ttest_cmp expect actual\n'> ) } ) (FuncDef name: run_with_limited_stack body: (BraceGroup children: [ (Subshell child: (AndOr children: [(C {(ulimit)} {(-s)} {(128)}) (C {(DQ ($ VSub_At '$@'))})] op_id: Op_DAmp ) spids: [4375 4387] ) ] spids: [4372] ) spids: [4367 4371] ) (C {(test_lazy_prereq)} {(ULIMIT_STACK_SIZE)} {(SQ <'run_with_limited_stack true'>)}) (C {(test_expect_success)} {(ULIMIT_STACK_SIZE)} {(SQ <'--contains works in a deep repo'>)} { (SQ <'\n'> <'\t>expect &&\n'> <'\ti=1 &&\n'> <'\twhile test $i -lt 8000\n'> <'\tdo\n'> <'\t\techo "commit refs/heads/master\n'> <'committer A U Thor <author@example.com> $((1000000000 + $i * 100)) +0200\n'> <'data <<EOF\n'> <'commit #$i\n'> <'EOF"\n'> <'\t\ttest $i = 1 && echo "from refs/heads/master^0"\n'> <'\t\ti=$(($i + 1))\n'> <'\tdone | git fast-import &&\n'> <'\tgit checkout master &&\n'> <'\tgit tag far-far-away HEAD^ &&\n'> <'\trun_with_limited_stack git tag --contains HEAD >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'--format should list tags as per format given'>)} { (SQ <'\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\trefname : refs/tags/foo1.10\n'> <'\trefname : refs/tags/foo1.3\n'> <'\trefname : refs/tags/foo1.6\n'> <'\trefname : refs/tags/foo1.6-rc1\n'> <'\trefname : refs/tags/foo1.6-rc2\n'> <'\tEOF\n'> <'\tgit tag -l --format="refname : %(refname)" "foo*" >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'setup --merged test tags'>)} { (SQ <'\n'> <'\tgit tag mergetest-1 HEAD~2 &&\n'> <'\tgit tag mergetest-2 HEAD~1 &&\n'> <'\tgit tag mergetest-3 HEAD\n'> ) } ) (C {(test_expect_success)} {(SQ <'--merged cannot be used in non-list mode'>)} {(SQ <'\n'> <'\ttest_must_fail git tag --merged=mergetest-2 foo\n'>)} ) (C {(test_expect_success)} {(SQ <'--merged shows merged tags'>)} { (SQ <'\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\tmergetest-1\n'> <'\tmergetest-2\n'> <'\tEOF\n'> <'\tgit tag -l --merged=mergetest-2 mergetest-* >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'--no-merged show unmerged tags'>)} { (SQ <'\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\tmergetest-3\n'> <'\tEOF\n'> <'\tgit tag -l --no-merged=mergetest-2 mergetest-* >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'ambiguous branch/tags not marked'>)} { (SQ <'\n'> <'\tgit tag ambiguous &&\n'> <'\tgit branch ambiguous &&\n'> <'\techo ambiguous >expect &&\n'> <'\tgit tag -l ambiguous >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_done)}) ] )