(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:test_description spids:[21]) op: Equal rhs: {(SQ <'git tag\n'> <'\n'> <'Tests for operations with tags.'>)} spids: [21] ) ] spids: [21] ) (C {(.)} {(./test-lib.sh)}) (C {(.)} {(DQ ($ VSub_Name '$TEST_DIRECTORY')) (/lib-gpg.sh)}) (command.FuncDef name: tag_exists body: (command.BraceGroup children: [ (C {(git)} {(show-ref)} {(--quiet)} {(--verify)} {(refs/tags/) (DQ ($ VSub_Number '$1'))}) ] spids: [50] ) spids: [45 49] ) (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'>)} ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 406 stdin_parts: [('myhead\n') ('mytag\n')] ) ] ) (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'>)} ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 510 stdin_parts: [ ('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') ] ) ] ) (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'> ) } ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 547 stdin_parts: [('a1\n') ('aa1\n') ('cba\n')] ) ] ) (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'>)} ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 575 stdin_parts: [('v0.2.1\n') ('v1.0.1\n')] ) ] ) (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'>)} ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 602 stdin_parts: [('t210\n') ('t211\n')] ) ] ) (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'>)} ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 628 stdin_parts: [('a1\n')] ) ] ) (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'>)} ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 654 stdin_parts: [('v1.0\n')] ) ] ) (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'>)} ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 681 stdin_parts: [('v1.0.1\n') ('v1.1.3\n')] ) ] ) (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'>)} ) (command.SimpleCommand redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (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'>)} ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 728 stdin_parts: [('v0.2.1\n') ('v1.0\n') ('v1.0.1\n') ('v1.1.3\n')] ) ] ) (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'>)} ) (command.FuncDef name: get_tag_msg body: (command.BraceGroup children: [ (command.Pipeline children: [ (C {(git)} {(cat-file)} {(tag)} {(DQ ($ VSub_Number '$1'))}) (C {(sed)} {(-e)} {(DQ ('/BEGIN PGP/q'))}) ] negated: F ) ] spids: [905] ) spids: [900 904] ) (command.FuncDef name: get_tag_header body: (command.BraceGroup children: [ (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 960 stdin_parts: [ ('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') ] ) ] ) ] spids: [939] ) spids: [934 938] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:commit spids:[964]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(git)} {(rev-parse)} {(HEAD)})]) left_token: <Left_CommandSub '$('> spids: [965 971] ) } spids: [964] ) ] spids: [964] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:time spids:[973]) op: Equal rhs: {($ VSub_Name '$test_tick')} spids: [973] ) ] spids: [973] ) (command.SimpleCommand words: [ {(get_tag_header)} {(annotated-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(DQ ('A message'))}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(msgfile)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 1026 stdin_parts: [('Another message\n') ('in a file.\n')] ) ] ) (command.SimpleCommand words: [ {(get_tag_header)} {(file-annotated-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(cat)} {(msgfile)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(inputmsg)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 1074 stdin_parts: [('A message from the\n') ('standard input\n')] ) ] ) (command.SimpleCommand words: [ {(get_tag_header)} {(stdin-annotated-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(cat)} {(inputmsg)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [ {(get_tag_header)} {(empty-annotated-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(emptyfile)})] ) (command.SimpleCommand words: [ {(get_tag_header)} {(emptyfile-annotated-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [{(printf)} {(SQ <'\\n\\n \\n\\t\\nLeading blank lines\\n'>)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(blanksfile)})] ) (command.SimpleCommand words: [{(printf)} {(SQ <'\\n\\t \\t \\nRepeated blank lines\\n'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(blanksfile)})] ) (command.SimpleCommand words: [{(printf)} {(SQ <'\\n\\n\\nTrailing spaces \\t \\n'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(blanksfile)})] ) (command.SimpleCommand words: [{(printf)} {(SQ <'\\nTrailing blank lines\\n\\n\\t \\n\\n'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(blanksfile)})] ) (command.SimpleCommand words: [ {(get_tag_header)} {(blanks-annotated-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 1279 stdin_parts: [ ('Leading blank lines\n') ('\n') ('Repeated blank lines\n') ('\n') ('Trailing spaces\n') ('\n') ('Trailing blank lines\n') ] ) ] ) (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'> ) } ) (command.SimpleCommand words: [ {(get_tag_header)} {(blank-annotated-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [{(echo)} {(SQ <' '>)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(blankfile)})] ) (command.SimpleCommand words: [{(echo)} {(SQ )}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(blankfile)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <' '>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(blankfile)})] ) (command.SimpleCommand words: [ {(get_tag_header)} {(blankfile-annotated-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [{(printf)} {(SQ <' '>)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(blanknonlfile)})] ) (command.SimpleCommand words: [ {(get_tag_header)} {(blanknonlfile-annotated-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(commentsfile)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 1446 stdin_parts: [ ('# 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') ] ) ] ) (command.SimpleCommand words: [ {(get_tag_header)} {(comments-annotated-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 1475 stdin_parts: [ ('The message.\n') ('One line.\n') ('\n') ('Another line.\n') ('\n') ('Last line.\n') ] ) ] ) (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'> ) } ) (command.SimpleCommand words: [ {(get_tag_header)} {(comment-annotated-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [{(echo)} {(SQ <'#comment'>)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(commentfile)})] ) (command.SimpleCommand words: [{(echo)} {(SQ )}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(commentfile)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'####'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(commentfile)})] ) (command.SimpleCommand words: [ {(get_tag_header)} {(commentfile-annotated-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [{(printf)} {(SQ <'#comment'>)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(commentnonlfile)})] ) (command.SimpleCommand words: [ {(get_tag_header)} {(commentnonlfile-annotated-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [{(echo)} {(SQ <'tag line one'>)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(annotagmsg)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'tag line two'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(annotagmsg)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'tag line three'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(annotagmsg)})] ) (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'> ) } ) (command.SimpleCommand words: [ {(get_tag_header)} {(signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'A signed tag message'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [ {(get_tag_header)} {(u-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'Another message'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(fakeeditor)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(SQ <EOF>)} here_end_span_id: 1986 stdin_parts: [ ('#!/bin/sh\n') ('test -n "$1" && exec >"$1"\n') ('echo A signed tag message\n') ('echo from a fake editor.\n') ] ) ] ) (C {(chmod)} {(Lit_Other '+') (x)} {(fakeeditor)}) (command.SimpleCommand words: [ {(get_tag_header)} {(implied-sign)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(./fakeeditor)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(sigmsgfile)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 2049 stdin_parts: [('Another signed tag\n') ('message in a file.\n')] ) ] ) (command.SimpleCommand words: [ {(get_tag_header)} {(file-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(cat)} {(sigmsgfile)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(siginputmsg)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 2108 stdin_parts: [('A signed tag message from\n') ('the standard input\n')] ) ] ) (command.SimpleCommand words: [ {(get_tag_header)} {(stdin-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(cat)} {(siginputmsg)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [ {(get_tag_header)} {(implied-annotate)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(./fakeeditor)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [ {(get_tag_header)} {(forcesignannotated-implied-sign)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(DQ ('A message'))}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [ {(get_tag_header)} {(forcesignannotated-annotate)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(DQ ('A message'))}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [ {(get_tag_header)} {(forcesignannotated-disabled)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(DQ ('A message'))}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [ {(get_tag_header)} {(empty-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(sigemptyfile)})] ) (command.SimpleCommand words: [ {(get_tag_header)} {(emptyfile-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [{(printf)} {(SQ <'\\n\\n \\n\\t\\nLeading blank lines\\n'>)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(sigblanksfile)})] ) (command.SimpleCommand words: [{(printf)} {(SQ <'\\n\\t \\t \\nRepeated blank lines\\n'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(sigblanksfile)})] ) (command.SimpleCommand words: [{(printf)} {(SQ <'\\n\\n\\nTrailing spaces \\t \\n'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(sigblanksfile)})] ) (command.SimpleCommand words: [{(printf)} {(SQ <'\\nTrailing blank lines\\n\\n\\t \\n\\n'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(sigblanksfile)})] ) (command.SimpleCommand words: [ {(get_tag_header)} {(blanks-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 2604 stdin_parts: [ ('Leading blank lines\n') ('\n') ('Repeated blank lines\n') ('\n') ('Trailing spaces\n') ('\n') ('Trailing blank lines\n') ] ) ] ) (command.SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [ {(get_tag_header)} {(blank-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [{(echo)} {(SQ <' '>)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(sigblankfile)})] ) (command.SimpleCommand words: [{(echo)} {(SQ )}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(sigblankfile)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <' '>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(sigblankfile)})] ) (command.SimpleCommand words: [ {(get_tag_header)} {(blankfile-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [{(printf)} {(SQ <' '>)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(sigblanknonlfile)})] ) (command.SimpleCommand words: [ {(get_tag_header)} {(blanknonlfile-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(sigcommentsfile)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 2819 stdin_parts: [ ('# 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') ] ) ] ) (command.SimpleCommand words: [ {(get_tag_header)} {(comments-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 2848 stdin_parts: [ ('The message.\n') ('One line.\n') ('\n') ('Another line.\n') ('\n') ('Last line.\n') ] ) ] ) (command.SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [ {(get_tag_header)} {(comment-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [{(echo)} {(SQ <'#comment'>)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(sigcommentfile)})] ) (command.SimpleCommand words: [{(echo)} {(SQ )}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(sigcommentfile)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'####'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(sigcommentfile)})] ) (command.SimpleCommand words: [ {(get_tag_header)} {(commentfile-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [{(printf)} {(SQ <'#comment'>)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(sigcommentnonlfile)})] ) (command.SimpleCommand words: [ {(get_tag_header)} {(commentnonlfile-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [{(echo)} {(SQ <'stag line one'>)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(sigtagmsg)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'stag line two'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(sigtagmsg)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'stag line three'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(sigtagmsg)})] ) (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'> ) } ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:tree spids:[3194]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(git)} {(rev-parse)} {(HEAD) (Lit_Other '^') (Lit_LBrace '{') (tree) (Lit_RBrace '}')} ) ] ) left_token: <Left_CommandSub '$('> spids: [3195 3205] ) } spids: [3194] ) ] spids: [3194] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:blob spids:[3207]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(rev-parse)} {(HEAD) (Lit_Other ':') (foo)})] ) left_token: <Left_CommandSub '$('> spids: [3208 3216] ) } spids: [3207] ) ] spids: [3207] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:tag spids:[3218]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.SimpleCommand words: [{(git)} {(rev-parse)} {(signed-tag)}] redirects: [(redir.Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})] ) ] ) left_token: <Left_CommandSub '$('> spids: [3219 3228] ) } spids: [3218] ) ] spids: [3218] ) (command.SimpleCommand words: [ {(get_tag_header)} {(tree-signed-tag)} {($ VSub_Name '$tree')} {(tree)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(DQ ('A message for a tree'))}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [ {(get_tag_header)} {(blob-signed-tag)} {($ VSub_Name '$blob')} {(blob)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(DQ ('A message for a blob'))}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [{(get_tag_header)} {(tag-signed-tag)} {($ VSub_Name '$tag')} {(tag)} {($ VSub_Name '$time')}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(DQ ('A message for another tag'))}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP SIGNATURE-----'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [ {(get_tag_header)} {(rfc1991-signed-tag)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(DQ ('RFC1991 signed tag'))}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(SQ <'-----BEGIN PGP MESSAGE-----'>)}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(fakeeditor)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(SQ <EOF>)} here_end_span_id: 3445 stdin_parts: [('#!/bin/sh\n') ('cp "$1" actual\n')] ) ] ) (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'> ) } ) (command.SimpleCommand words: [{(get_tag_header)} {(reuse)} {($ VSub_Name '$commit')} {(commit)} {($ VSub_Name '$time')}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (command.SimpleCommand words: [{(echo)} {(DQ ('An annotation to be reused'))}] redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})] ) (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'> ) } ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:hash1 spids:[3813]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(git)} {(rev-parse)} {(HEAD)})]) left_token: <Left_CommandSub '$('> spids: [3814 3820] ) } spids: [3813] ) ] spids: [3813] ) (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'> ) } ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:hash2 spids:[3838]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(git)} {(rev-parse)} {(HEAD)})]) left_token: <Left_CommandSub '$('> spids: [3839 3845] ) } spids: [3838] ) ] spids: [3838] ) (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'>)} ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:hash3 spids:[3862]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(git)} {(rev-parse)} {(HEAD)})]) left_token: <Left_CommandSub '$('> spids: [3863 3869] ) } spids: [3862] ) ] spids: [3862] ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expected)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 3891 stdin_parts: [('v0.2.1\n') ('v1.0\n') ('v1.0.1\n') ('v1.1.3\n') ('v2.0\n')] ) ] ) (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')) } ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expected)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 3948 stdin_parts: [('v2.0\n')] ) ] ) (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') ) } ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expected)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 3976 ) ] ) (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'> ) } ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:hash4 spids:[4013]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(git)} {(rev-parse)} {(HEAD)})]) left_token: <Left_CommandSub '$('> spids: [4014 4020] ) } spids: [4013] ) ] spids: [4013] ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expected)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 4034 stdin_parts: [('v3.0\n')] ) ] ) (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'>)} ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expected)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 4075 stdin_parts: [('v4.0\n')] ) ] ) (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') ) } ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expected)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 4109 stdin_parts: [('v0.2.1\n') ('v1.0\n') ('v1.0.1\n') ('v1.1.3\n') ('v2.0\n') ('v3.0\n') ('v4.0\n')] ) ] ) (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'> ) } ) (command.FuncDef name: run_with_limited_stack body: (command.BraceGroup children: [ (command.Subshell child: (command.AndOr ops: [Op_DAmp] children: [(C {(ulimit)} {(-s)} {(128)}) (C {(DQ ($ VSub_At '$@'))})] ) spids: [4417 4429] ) ] spids: [4414] ) spids: [4409 4413] ) (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)}) ] )