(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <"git pack-object --include-tag">)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TRASH) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub "$("> spids: [15 17] ) } spids: [14] ) ] spids: [14] ) (C {(test_expect_success)} {(setup)} { (SQ <"\n"> <"\techo c >d &&\n"> <"\tgit update-index --add d &&\n"> <"\ttree=$(git write-tree) &&\n"> <"\tcommit=$(git commit-tree $tree </dev/null) &&\n"> <"\techo \"object $commit\" >sig &&\n"> <"\techo \"type commit\" >>sig &&\n"> <"\techo \"tag mytag\" >>sig &&\n"> <"\techo \"tagger $(git var GIT_COMMITTER_IDENT)\" >>sig &&\n"> <"\techo >>sig &&\n"> <"\techo \"our test tag\" >>sig &&\n"> <"\ttag=$(git mktag <sig) &&\n"> <"\trm d sig &&\n"> <"\tgit update-ref refs/tags/mytag $tag && {\n"> <"\t\techo $tree &&\n"> <"\t\techo $commit &&\n"> <"\t\tgit ls-tree $tree | sed -e \"s/.* \\\\([0-9a-f]*\\\\)\t.*/\\\\1/\"\n"> <"\t} >obj-list\n"> ) } ) (C {(test_expect_success)} {(SQ <"pack without --include-tag">)} { (SQ <"\n"> <"\tpackname=$(git pack-objects \\\n"> <"\t\t--window=0 \\\n"> <"\t\ttest-no-include <obj-list)\n"> ) } ) (C {(test_expect_success)} {(SQ <"unpack objects">)} { (SQ <"\n"> <"\trm -rf clone.git &&\n"> <"\tgit init clone.git &&\n"> <"\tgit -C clone.git unpack-objects <test-no-include-${packname}.pack\n"> ) } ) (C {(test_expect_success)} {(SQ <"check unpacked result (have commit, no tag)">)} { (SQ <"\n"> <"\tgit rev-list --objects $commit >list.expect &&\n"> <"\ttest_must_fail git -C clone.git cat-file -e $tag &&\n"> <"\tgit -C clone.git rev-list --objects $commit >list.actual &&\n"> <"\ttest_cmp list.expect list.actual\n"> ) } ) (C {(test_expect_success)} {(SQ <"pack with --include-tag">)} { (SQ <"\n"> <"\tpackname=$(git pack-objects \\\n"> <"\t\t--window=0 \\\n"> <"\t\t--include-tag \\\n"> <"\t\ttest-include <obj-list)\n"> ) } ) (C {(test_expect_success)} {(SQ <"unpack objects">)} { (SQ <"\n"> <"\trm -rf clone.git &&\n"> <"\tgit init clone.git &&\n"> <"\tgit -C clone.git unpack-objects <test-include-${packname}.pack\n"> ) } ) (C {(test_expect_success)} {(SQ <"check unpacked result (have commit, have tag)">)} { (SQ <"\n"> <"\tgit rev-list --objects mytag >list.expect &&\n"> <"\tgit -C clone.git rev-list --objects $tag >list.actual &&\n"> <"\ttest_cmp list.expect list.actual\n"> ) } ) (C {(test_expect_success)} {(SQ <"create hidden inner tag">)} { (SQ <"\n"> <"\ttest_commit commit &&\n"> <"\tgit tag -m inner inner HEAD &&\n"> <"\tgit tag -m outer outer inner &&\n"> <"\tgit tag -d inner\n"> ) } ) (C {(test_expect_success)} {(SQ <"pack explicit outer tag">)} { (SQ <"\n"> <"\tpackname=$(\n"> <"\t\t{\n"> <"\t\t\techo HEAD &&\n"> <"\t\t\techo outer\n"> <"\t\t} |\n"> <"\t\tgit pack-objects --revs test-hidden-explicit\n"> <"\t)\n"> ) } ) (C {(test_expect_success)} {(SQ <"unpack objects">)} { (SQ <"\n"> <"\trm -rf clone.git &&\n"> <"\tgit init clone.git &&\n"> <"\tgit -C clone.git unpack-objects <test-hidden-explicit-${packname}.pack\n"> ) } ) (C {(test_expect_success)} {(SQ <"check unpacked result (have all objects)">)} {(SQ <"\n"> <"\tgit -C clone.git rev-list --objects $(git rev-parse outer HEAD)\n">)} ) (C {(test_expect_success)} {(SQ <"pack implied outer tag">)} { (SQ <"\n"> <"\tpackname=$(\n"> <"\t\techo HEAD |\n"> <"\t\tgit pack-objects --revs --include-tag test-hidden-implied\n"> <"\t)\n"> ) } ) (C {(test_expect_success)} {(SQ <"unpack objects">)} { (SQ <"\n"> <"\trm -rf clone.git &&\n"> <"\tgit init clone.git &&\n"> <"\tgit -C clone.git unpack-objects <test-hidden-implied-${packname}.pack\n"> ) } ) (C {(test_expect_success)} {(SQ <"check unpacked result (have all objects)">)} {(SQ <"\n"> <"\tgit -C clone.git rev-list --objects $(git rev-parse outer HEAD)\n">)} ) (C {(test_expect_success)} {(SQ <"single-branch clone can transfer tag">)} { (SQ <"\n"> <"\trm -rf clone.git &&\n"> <"\tgit clone --no-local --single-branch -b master . clone.git &&\n"> <"\tgit -C clone.git fsck\n"> ) } ) (C {(test_done)}) ] )