(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: {(SQ (Token id:Id.Lit_Chars val:'git fast-export' span_id:15))} spids: [13] ) ] ) (C {(.)} {(./test-lib.sh)}) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:setup span_id:26))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:30) (Token id:Id.Lit_Chars val:'\n' span_id:31) (Token id:Id.Lit_Chars val:'\techo break it > file0 &&\n' span_id:32) (Token id:Id.Lit_Chars val:'\tgit add file0 &&\n' span_id:33) (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:34) (Token id:Id.Lit_Chars val:'\techo Wohlauf > file &&\n' span_id:35) (Token id:Id.Lit_Chars val:'\tgit add file &&\n' span_id:36) (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:37) (Token id:Id.Lit_Chars val:'\tgit commit -m initial &&\n' span_id:38) (Token id:Id.Lit_Chars val:'\techo die Luft > file &&\n' span_id:39) (Token id:Id.Lit_Chars val:'\techo geht frisch > file2 &&\n' span_id:40) (Token id:Id.Lit_Chars val:'\tgit add file file2 &&\n' span_id:41) (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:42) (Token id:Id.Lit_Chars val:'\tgit commit -m second &&\n' span_id:43) (Token id:Id.Lit_Chars val:'\techo und > file2 &&\n' span_id:44) (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:45) (Token id:Id.Lit_Chars val:'\tgit commit -m third file2 &&\n' span_id:46) (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:47) (Token id:Id.Lit_Chars val:'\tgit tag rein &&\n' span_id:48) (Token id:Id.Lit_Chars val:'\tgit checkout -b wer HEAD^ &&\n' span_id:49) (Token id:Id.Lit_Chars val:'\techo lange > file2 &&\n' span_id:50) (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:51) (Token id:Id.Lit_Chars val:'\tgit commit -m sitzt file2 &&\n' span_id:52) (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:53) (Token id:Id.Lit_Chars val:'\tgit tag -a -m valentin muss &&\n' span_id:54) (Token id:Id.Lit_Chars val:'\tgit merge -s ours master\n' span_id:55) (Token id:Id.Lit_Chars val:'\n' span_id:56) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'fast-export | fast-import' span_id:63))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:67) (Token id:Id.Lit_Chars val:'\n' span_id:68) (Token id: Id.Lit_Chars val: '\tMASTER=$(git rev-parse --verify master) &&\n' span_id: 69 ) (Token id:Id.Lit_Chars val:'\tREIN=$(git rev-parse --verify rein) &&\n' span_id:70) (Token id:Id.Lit_Chars val:'\tWER=$(git rev-parse --verify wer) &&\n' span_id:71) (Token id:Id.Lit_Chars val:'\tMUSS=$(git rev-parse --verify muss) &&\n' span_id:72) (Token id:Id.Lit_Chars val:'\tmkdir new &&\n' span_id:73) (Token id:Id.Lit_Chars val:'\tgit --git-dir=new/.git init &&\n' span_id:74) (Token id:Id.Lit_Chars val:'\tgit fast-export --all |\n' span_id:75) (Token id:Id.Lit_Chars val:'\t(cd new &&\n' span_id:76) (Token id:Id.Lit_Chars val:'\t git fast-import &&\n' span_id:77) (Token id: Id.Lit_Chars val: '\t test $MASTER = $(git rev-parse --verify refs/heads/master) &&\n' span_id: 78 ) (Token id: Id.Lit_Chars val: '\t test $REIN = $(git rev-parse --verify refs/tags/rein) &&\n' span_id: 79 ) (Token id:Id.Lit_Chars val:'\t test $WER = $(git rev-parse --verify refs/heads/wer) &&\n' span_id:80) (Token id: Id.Lit_Chars val: '\t test $MUSS = $(git rev-parse --verify refs/tags/muss))\n' span_id: 81 ) (Token id:Id.Lit_Chars val:'\n' span_id:82) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'fast-export master~2..master' span_id:89))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:93) (Token id:Id.Lit_Chars val:'\n' span_id:94) (Token id:Id.Lit_Chars val:'\tgit fast-export master~2..master |\n' span_id:95) (Token id:Id.Lit_Chars val:'\t\tsed "s/master/partial/" |\n' span_id:96) (Token id:Id.Lit_Chars val:'\t\t(cd new &&\n' span_id:97) (Token id:Id.Lit_Chars val:'\t\t git fast-import &&\n' span_id:98) (Token id: Id.Lit_Chars val: '\t\t test $MASTER != $(git rev-parse --verify refs/heads/partial) &&\n' span_id: 99 ) (Token id:Id.Lit_Chars val:'\t\t git diff --exit-code master partial &&\n' span_id:100) (Token id: Id.Lit_Chars val: '\t\t git diff --exit-code master^ partial^ &&\n' span_id: 101 ) (Token id:Id.Lit_Chars val:'\t\t test_must_fail git rev-parse partial~2)\n' span_id:102) (Token id:Id.Lit_Chars val:'\n' span_id:103) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:iso-8859-1 span_id:110))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:114) (Token id:Id.Lit_Chars val:'\n' span_id:115) (Token id: Id.Lit_Chars val: '\tgit config i18n.commitencoding ISO8859-1 &&\n' span_id: 116 ) (Token id: Id.Lit_Chars val: '\t# use author and committer name in ISO-8859-1 to match it.\n' span_id: 117 ) (Token id:Id.Lit_Chars val:'\t. "$TEST_DIRECTORY"/t3901-8859-1.txt &&\n' span_id:118) (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:119) (Token id:Id.Lit_Chars val:'\techo rosten >file &&\n' span_id:120) (Token id:Id.Lit_Chars val:'\tgit commit -s -m den file &&\n' span_id:121) (Token id:Id.Lit_Chars val:'\tgit fast-export wer^..wer |\n' span_id:122) (Token id:Id.Lit_Chars val:'\t\tsed "s/wer/i18n/" |\n' span_id:123) (Token id:Id.Lit_Chars val:'\t\t(cd new &&\n' span_id:124) (Token id:Id.Lit_Chars val:'\t\t git fast-import &&\n' span_id:125) (Token id: Id.Lit_Chars val: '\t\t git cat-file commit i18n | grep "\xc3\x81\xc3\xa9\xc3\xad \xc3\xb3\xc3\xba")\n' span_id: 126 ) (Token id:Id.Lit_Chars val:'\n' span_id:127) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:import/export-marks span_id:133))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:137) (Token id:Id.Lit_Chars val:'\n' span_id:138) (Token id:Id.Lit_Chars val:'\tgit checkout -b marks master &&\n' span_id:139) (Token id:Id.Lit_Chars val:'\tgit fast-export --export-marks=tmp-marks HEAD &&\n' span_id:140) (Token id:Id.Lit_Chars val:'\ttest -s tmp-marks &&\n' span_id:141) (Token id:Id.Lit_Chars val:'\ttest_line_count = 3 tmp-marks &&\n' span_id:142) (Token id:Id.Lit_Chars val:'\ttest $(\n' span_id:143) (Token id:Id.Lit_Chars val:'\t\tgit fast-export --import-marks=tmp-marks\\\n' span_id:144) (Token id:Id.Lit_Chars val:'\t\t--export-marks=tmp-marks HEAD |\n' span_id:145) (Token id:Id.Lit_Chars val:'\t\tgrep ^commit |\n' span_id:146) (Token id:Id.Lit_Chars val:'\t\twc -l) \\\n' span_id:147) (Token id:Id.Lit_Chars val:'\t-eq 0 &&\n' span_id:148) (Token id:Id.Lit_Chars val:'\techo change > file &&\n' span_id:149) (Token id:Id.Lit_Chars val:'\tgit commit -m "last commit" file &&\n' span_id:150) (Token id:Id.Lit_Chars val:'\ttest $(\n' span_id:151) (Token id:Id.Lit_Chars val:'\t\tgit fast-export --import-marks=tmp-marks \\\n' span_id:152) (Token id:Id.Lit_Chars val:'\t\t--export-marks=tmp-marks HEAD |\n' span_id:153) (Token id:Id.Lit_Chars val:'\t\tgrep ^commit\\ |\n' span_id:154) (Token id:Id.Lit_Chars val:'\t\twc -l) \\\n' span_id:155) (Token id:Id.Lit_Chars val:'\t-eq 1 &&\n' span_id:156) (Token id:Id.Lit_Chars val:'\ttest_line_count = 4 tmp-marks\n' span_id:157) (Token id:Id.Lit_Chars val:'\n' span_id:158) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:164) fd: -1 arg_word: {(signed-tag-import)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:168) fd: -1 here_begin: {(EOF)} here_end_span_id: 193 stdin_parts: [ ('tag sign-your-name\n') ('from ') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:174) command_list: (command.CommandList children:[(C {(git)} {(rev-parse)} {(HEAD)})]) ) ('\n') ('tagger C O Mitter <committer@example.com> 1112911993 -0700\n') ('data 210\n') ('A message for a sign\n') ('-----BEGIN PGP SIGNATURE-----\n') ('Version: GnuPG v1.4.5 (GNU/Linux)\n') ('\n') ('fakedsignaturefakedsignaturefakedsignaturefakedsignaturfakedsign\n') ('aturefakedsignaturefake=\n') ('=/59v\n') ('-----END PGP SIGNATURE-----\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'set up faked signed tag' span_id:198))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:202) (Token id:Id.Lit_Chars val:'\n' span_id:203) (Token id: Id.Lit_Chars val: '\tcat signed-tag-import | git fast-import\n' span_id: 204 ) (Token id:Id.Lit_Chars val:'\n' span_id:205) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'signed-tags=abort' span_id:212))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:216) (Token id:Id.Lit_Chars val:'\n' span_id:217) (Token id: Id.Lit_Chars val: '\ttest_must_fail git fast-export --signed-tags=abort sign-your-name\n' span_id: 218 ) (Token id:Id.Lit_Chars val:'\n' span_id:219) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'signed-tags=verbatim' span_id:226))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:230) (Token id:Id.Lit_Chars val:'\n' span_id:231) (Token id: Id.Lit_Chars val: '\tgit fast-export --signed-tags=verbatim sign-your-name > output &&\n' span_id: 232 ) (Token id:Id.Lit_Chars val:'\tgrep PGP output\n' span_id:233) (Token id:Id.Lit_Chars val:'\n' span_id:234) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'signed-tags=strip' span_id:241))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:245) (Token id:Id.Lit_Chars val:'\n' span_id:246) (Token id: Id.Lit_Chars val: '\tgit fast-export --signed-tags=strip sign-your-name > output &&\n' span_id: 247 ) (Token id:Id.Lit_Chars val:'\t! grep PGP output\n' span_id:248) (Token id:Id.Lit_Chars val:'\n' span_id:249) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'signed-tags=warn-strip' span_id:256))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:260) (Token id: Id.Lit_Chars val: '\tgit fast-export --signed-tags=warn-strip sign-your-name >output 2>err &&\n' span_id: 261 ) (Token id:Id.Lit_Chars val:'\t! grep PGP output &&\n' span_id:262) (Token id:Id.Lit_Chars val:'\ttest -s err\n' span_id:263) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'setup submodule' span_id:270))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:274) (Token id:Id.Lit_Chars val:'\n' span_id:275) (Token id:Id.Lit_Chars val:'\tgit checkout -f master &&\n' span_id:276) (Token id:Id.Lit_Chars val:'\tmkdir sub &&\n' span_id:277) (Token id:Id.Lit_Chars val:'\t(\n' span_id:278) (Token id:Id.Lit_Chars val:'\t\tcd sub &&\n' span_id:279) (Token id:Id.Lit_Chars val:'\t\tgit init &&\n' span_id:280) (Token id:Id.Lit_Chars val:'\t\techo test file > file &&\n' span_id:281) (Token id:Id.Lit_Chars val:'\t\tgit add file &&\n' span_id:282) (Token id:Id.Lit_Chars val:'\t\tgit commit -m sub_initial\n' span_id:283) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:284) (Token id:Id.Lit_Chars val:'\tgit submodule add "$(pwd)/sub" sub &&\n' span_id:285) (Token id:Id.Lit_Chars val:'\tgit commit -m initial &&\n' span_id:286) (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:287) (Token id:Id.Lit_Chars val:'\t(\n' span_id:288) (Token id:Id.Lit_Chars val:'\t\tcd sub &&\n' span_id:289) (Token id:Id.Lit_Chars val:'\t\techo more data >> file &&\n' span_id:290) (Token id:Id.Lit_Chars val:'\t\tgit add file &&\n' span_id:291) (Token id:Id.Lit_Chars val:'\t\tgit commit -m sub_second\n' span_id:292) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:293) (Token id:Id.Lit_Chars val:'\tgit add sub &&\n' span_id:294) (Token id:Id.Lit_Chars val:'\tgit commit -m second\n' span_id:295) (Token id:Id.Lit_Chars val:'\n' span_id:296) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'submodule fast-export | fast-import' span_id:303))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:307) (Token id:Id.Lit_Chars val:'\n' span_id:308) (Token id: Id.Lit_Chars val: '\tSUBENT1=$(git ls-tree master^ sub) &&\n' span_id: 309 ) (Token id:Id.Lit_Chars val:'\tSUBENT2=$(git ls-tree master sub) &&\n' span_id:310) (Token id:Id.Lit_Chars val:'\trm -rf new &&\n' span_id:311) (Token id:Id.Lit_Chars val:'\tmkdir new &&\n' span_id:312) (Token id:Id.Lit_Chars val:'\tgit --git-dir=new/.git init &&\n' span_id:313) (Token id:Id.Lit_Chars val:'\tgit fast-export --signed-tags=strip --all |\n' span_id:314) (Token id:Id.Lit_Chars val:'\t(cd new &&\n' span_id:315) (Token id:Id.Lit_Chars val:'\t git fast-import &&\n' span_id:316) (Token id: Id.Lit_Chars val: '\t test "$SUBENT1" = "$(git ls-tree refs/heads/master^ sub)" &&\n' span_id: 317 ) (Token id: Id.Lit_Chars val: '\t test "$SUBENT2" = "$(git ls-tree refs/heads/master sub)" &&\n' span_id: 318 ) (Token id:Id.Lit_Chars val:'\t git checkout master &&\n' span_id:319) (Token id:Id.Lit_Chars val:'\t git submodule init &&\n' span_id:320) (Token id:Id.Lit_Chars val:'\t git submodule update &&\n' span_id:321) (Token id:Id.Lit_Chars val:'\t cmp sub/file ../sub/file)\n' span_id:322) (Token id:Id.Lit_Chars val:'\n' span_id:323) ) } ) (command.CommandList children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GIT_AUTHOR_NAME) op: assign_op.Equal rhs: {(SQ (Token id:Id.Lit_Chars val:'A U Thor' span_id:329))} spids: [327] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:331) ) (C {(export)} {(GIT_AUTHOR_NAME)}) ] ) (command.CommandList children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GIT_COMMITTER_NAME) op: assign_op.Equal rhs: {(SQ (Token id:Id.Lit_Chars val:'C O Mitter' span_id:339))} spids: [337] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:341) ) (C {(export)} {(GIT_COMMITTER_NAME)}) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'setup copies' span_id:351))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:355) (Token id:Id.Lit_Chars val:'\n' span_id:356) (Token id: Id.Lit_Chars val: '\tgit config --unset i18n.commitencoding &&\n' span_id: 357 ) (Token id:Id.Lit_Chars val:'\tgit checkout -b copy rein &&\n' span_id:358) (Token id:Id.Lit_Chars val:'\tgit mv file file3 &&\n' span_id:359) (Token id:Id.Lit_Chars val:'\tgit commit -m move1 &&\n' span_id:360) (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:361) (Token id:Id.Lit_Chars val:'\tcp file2 file4 &&\n' span_id:362) (Token id:Id.Lit_Chars val:'\tgit add file4 &&\n' span_id:363) (Token id:Id.Lit_Chars val:'\tgit mv file2 file5 &&\n' span_id:364) (Token id:Id.Lit_Chars val:'\tgit commit -m copy1 &&\n' span_id:365) (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:366) (Token id:Id.Lit_Chars val:'\tcp file3 file6 &&\n' span_id:367) (Token id:Id.Lit_Chars val:'\tgit add file6 &&\n' span_id:368) (Token id:Id.Lit_Chars val:'\tgit commit -m copy2 &&\n' span_id:369) (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:370) (Token id:Id.Lit_Chars val:'\techo more text >> file6 &&\n' span_id:371) (Token id:Id.Lit_Chars val:'\techo even more text >> file6 &&\n' span_id:372) (Token id:Id.Lit_Chars val:'\tgit add file6 &&\n' span_id:373) (Token id:Id.Lit_Chars val:'\tgit commit -m modify &&\n' span_id:374) (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:375) (Token id:Id.Lit_Chars val:'\tcp file6 file7 &&\n' span_id:376) (Token id:Id.Lit_Chars val:'\techo test >> file7 &&\n' span_id:377) (Token id:Id.Lit_Chars val:'\tgit add file7 &&\n' span_id:378) (Token id:Id.Lit_Chars val:'\tgit commit -m copy_modify\n' span_id:379) (Token id:Id.Lit_Chars val:'\n' span_id:380) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'fast-export -C -C | fast-import' span_id:387))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:391) (Token id:Id.Lit_Chars val:'\n' span_id:392) (Token id: Id.Lit_Chars val: '\tENTRY=$(git rev-parse --verify copy) &&\n' span_id: 393 ) (Token id:Id.Lit_Chars val:'\trm -rf new &&\n' span_id:394) (Token id:Id.Lit_Chars val:'\tmkdir new &&\n' span_id:395) (Token id:Id.Lit_Chars val:'\tgit --git-dir=new/.git init &&\n' span_id:396) (Token id: Id.Lit_Chars val: '\tgit fast-export -C -C --signed-tags=strip --all > output &&\n' span_id: 397 ) (Token id:Id.Lit_Chars val:'\tgrep "^C file6 file7\\$" output &&\n' span_id:398) (Token id:Id.Lit_Chars val:'\tcat output |\n' span_id:399) (Token id:Id.Lit_Chars val:'\t(cd new &&\n' span_id:400) (Token id:Id.Lit_Chars val:'\t git fast-import &&\n' span_id:401) (Token id: Id.Lit_Chars val: '\t test $ENTRY = $(git rev-parse --verify refs/heads/copy))\n' span_id: 402 ) (Token id:Id.Lit_Chars val:'\n' span_id:403) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'fast-export | fast-import when master is tagged' span_id:410))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:414) (Token id:Id.Lit_Chars val:'\n' span_id:415) (Token id:Id.Lit_Chars val:'\tgit tag -m msg last &&\n' span_id:416) (Token id: Id.Lit_Chars val: '\tgit fast-export -C -C --signed-tags=strip --all > output &&\n' span_id: 417 ) (Token id:Id.Lit_Chars val:'\ttest $(grep -c "^tag " output) = 3\n' span_id:418) (Token id:Id.Lit_Chars val:'\n' span_id:419) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:425) fd: -1 arg_word: {(tag-content)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:429) fd: -1 here_begin: {(EOF)} here_end_span_id: 445 stdin_parts: [ ('object ') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:434) command_list: (command.CommandList children:[(C {(git)} {(rev-parse)} {(HEAD)})]) ) ('\n') ('type commit\n') ('tag rosten\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'cope with tagger-less tags' span_id:450))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:454) (Token id:Id.Lit_Chars val:'\n' span_id:455) (Token id: Id.Lit_Chars val: '\tTAG=$(git hash-object -t tag -w tag-content) &&\n' span_id: 456 ) (Token id:Id.Lit_Chars val:'\tgit update-ref refs/tags/sonnenschein $TAG &&\n' span_id:457) (Token id: Id.Lit_Chars val: '\tgit fast-export -C -C --signed-tags=strip --all > output &&\n' span_id: 458 ) (Token id:Id.Lit_Chars val:'\ttest $(grep -c "^tag " output) = 4 &&\n' span_id:459) (Token id: Id.Lit_Chars val: '\t! grep "Unspecified Tagger" output &&\n' span_id: 460 ) (Token id:Id.Lit_Chars val:'\tgit fast-export -C -C --signed-tags=strip --all \\\n' span_id:461) (Token id:Id.Lit_Chars val:'\t\t--fake-missing-tagger > output &&\n' span_id:462) (Token id:Id.Lit_Chars val:'\ttest $(grep -c "^tag " output) = 4 &&\n' span_id:463) (Token id:Id.Lit_Chars val:'\tgrep "Unspecified Tagger" output\n' span_id:464) (Token id:Id.Lit_Chars val:'\n' span_id:465) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'setup for limiting exports by PATH' span_id:472))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:476) (Token id:Id.Lit_Chars val:'\tmkdir limit-by-paths &&\n' span_id:477) (Token id:Id.Lit_Chars val:'\t(\n' span_id:478) (Token id:Id.Lit_Chars val:'\t\tcd limit-by-paths &&\n' span_id:479) (Token id:Id.Lit_Chars val:'\t\tgit init &&\n' span_id:480) (Token id:Id.Lit_Chars val:'\t\techo hi > there &&\n' span_id:481) (Token id:Id.Lit_Chars val:'\t\tgit add there &&\n' span_id:482) (Token id:Id.Lit_Chars val:'\t\tgit commit -m "First file" &&\n' span_id:483) (Token id:Id.Lit_Chars val:'\t\techo foo > bar &&\n' span_id:484) (Token id:Id.Lit_Chars val:'\t\tgit add bar &&\n' span_id:485) (Token id:Id.Lit_Chars val:'\t\tgit commit -m "Second file" &&\n' span_id:486) (Token id:Id.Lit_Chars val:'\t\tgit tag -a -m msg mytag &&\n' span_id:487) (Token id:Id.Lit_Chars val:'\t\techo morefoo >> bar &&\n' span_id:488) (Token id:Id.Lit_Chars val:'\t\tgit add bar &&\n' span_id:489) (Token id:Id.Lit_Chars val:'\t\tgit commit -m "Change to second file"\n' span_id:490) (Token id:Id.Lit_Chars val:'\t)\n' span_id:491) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:497) fd: -1 arg_word: {(limit-by-paths/expected)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:501) fd: -1 here_begin: {(EOF)} here_end_span_id: 520 stdin_parts: [ ('blob\n') ('mark :1\n') ('data 3\n') ('hi\n') ('\n') ('reset refs/tags/mytag\n') ('commit refs/tags/mytag\n') ('mark :2\n') ('author A U Thor <author@example.com> 1112912713 -0700\n') ('committer C O Mitter <committer@example.com> 1112912713 -0700\n') ('data 11\n') ('First file\n') ('M 100644 :1 there\n') ('\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'dropping tag of filtered out object' span_id:525))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:529) (Token id:Id.Lit_Chars val:'(\n' span_id:530) (Token id:Id.Lit_Chars val:'\tcd limit-by-paths &&\n' span_id:531) (Token id: Id.Lit_Chars val: '\tgit fast-export --tag-of-filtered-object=drop mytag -- there > output &&\n' span_id: 532 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expected output\n' span_id:533) (Token id:Id.Lit_Chars val:')\n' span_id:534) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:540) fd: -1 arg_word: {(limit-by-paths/expected)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:544) fd: -1 here_begin: {(EOF)} here_end_span_id: 555 stdin_parts: [ ('tag mytag\n') ('from :2\n') ('tagger C O Mitter <committer@example.com> 1112912713 -0700\n') ('data 4\n') ('msg\n') ('\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'rewriting tag of filtered out object' span_id:560))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:564) (Token id:Id.Lit_Chars val:'(\n' span_id:565) (Token id:Id.Lit_Chars val:'\tcd limit-by-paths &&\n' span_id:566) (Token id: Id.Lit_Chars val: '\tgit fast-export --tag-of-filtered-object=rewrite mytag -- there > output &&\n' span_id: 567 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expected output\n' span_id:568) (Token id:Id.Lit_Chars val:')\n' span_id:569) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:575) fd: -1 arg_word: {(limit-by-paths/expected)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:579) fd: -1 here_begin: {(EOF)} here_end_span_id: 604 stdin_parts: [ ('blob\n') ('mark :1\n') ('data 4\n') ('foo\n') ('\n') ('blob\n') ('mark :2\n') ('data 3\n') ('hi\n') ('\n') ('reset refs/heads/master\n') ('commit refs/heads/master\n') ('mark :3\n') ('author A U Thor <author@example.com> 1112912713 -0700\n') ('committer C O Mitter <committer@example.com> 1112912713 -0700\n') ('data 12\n') ('Second file\n') ('M 100644 :1 bar\n') ('M 100644 :2 there\n') ('\n') ] ) ] ) (C {(test_expect_failure)} {(SQ (Token id:Id.Lit_Chars val:'no exact-ref revisions included' span_id:609))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:613) (Token id:Id.Lit_Chars val:'\t(\n' span_id:614) (Token id:Id.Lit_Chars val:'\t\tcd limit-by-paths &&\n' span_id:615) (Token id: Id.Lit_Chars val: '\t\tgit fast-export master~2..master~1 > output &&\n' span_id: 616 ) (Token id:Id.Lit_Chars val:'\t\ttest_cmp expected output\n' span_id:617) (Token id:Id.Lit_Chars val:'\t)\n' span_id:618) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'path limiting with import-marks does not lose unmodified files' span_id: 625 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:629) (Token id:Id.Lit_Chars val:'\tgit checkout -b simple marks~2 &&\n' span_id:630) (Token id: Id.Lit_Chars val: '\tgit fast-export --export-marks=marks simple -- file > /dev/null &&\n' span_id: 631 ) (Token id:Id.Lit_Chars val:'\techo more content >> file &&\n' span_id:632) (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:633) (Token id:Id.Lit_Chars val:'\tgit commit -mnext file &&\n' span_id:634) (Token id: Id.Lit_Chars val: '\tgit fast-export --import-marks=marks simple -- file file0 | grep file0\n' span_id: 635 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'full-tree re-shows unmodified files' span_id:642))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:646) (Token id:Id.Lit_Chars val:'\tgit checkout -f simple &&\n' span_id:647) (Token id: Id.Lit_Chars val: '\ttest $(git fast-export --full-tree simple | grep -c file0) -eq 3\n' span_id: 648 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'set-up a few more tags for tag export tests' span_id:655))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:659) (Token id:Id.Lit_Chars val:'\tgit checkout -f master &&\n' span_id:660) (Token id: Id.Lit_Chars val: '\tHEAD_TREE=$(git show -s --pretty=raw HEAD | grep tree | sed "s/tree //") &&\n' span_id: 661 ) (Token id: Id.Lit_Chars val: '\tgit tag tree_tag -m "tagging a tree" $HEAD_TREE &&\n' span_id: 662 ) (Token id: Id.Lit_Chars val: '\tgit tag -a tree_tag-obj -m "tagging a tree" $HEAD_TREE &&\n' span_id: 663 ) (Token id: Id.Lit_Chars val: '\tgit tag tag-obj_tag -m "tagging a tag" tree_tag-obj &&\n' span_id: 664 ) (Token id: Id.Lit_Chars val: '\tgit tag -a tag-obj_tag-obj -m "tagging a tag" tree_tag-obj\n' span_id: 665 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:tree_tag span_id:672))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:676) (Token id:Id.Lit_Chars val:'\tmkdir result &&\n' span_id:677) (Token id:Id.Lit_Chars val:'\t(cd result && git init) &&\n' span_id:678) (Token id: Id.Lit_Chars val: '\tgit fast-export tree_tag > fe-stream &&\n' span_id: 679 ) (Token id:Id.Lit_Chars val:'\t(cd result && git fast-import < ../fe-stream)\n' span_id:680) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:tree_tag-obj span_id:690))} {(SQ (Token id:Id.Lit_Chars val:'git fast-export tree_tag-obj' span_id:694))} ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:tag-obj_tag span_id:700))} {(SQ (Token id:Id.Lit_Chars val:'git fast-export tag-obj_tag' span_id:704))} ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:tag-obj_tag-obj span_id:710))} {(SQ (Token id:Id.Lit_Chars val:'git fast-export tag-obj_tag-obj' span_id:714))} ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'directory becomes symlink' span_id:721))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:725) (Token id:Id.Lit_Chars val:'\tgit init dirtosymlink &&\n' span_id:726) (Token id:Id.Lit_Chars val:'\tgit init result &&\n' span_id:727) (Token id:Id.Lit_Chars val:'\t(\n' span_id:728) (Token id:Id.Lit_Chars val:'\t\tcd dirtosymlink &&\n' span_id:729) (Token id:Id.Lit_Chars val:'\t\tmkdir foo &&\n' span_id:730) (Token id:Id.Lit_Chars val:'\t\tmkdir bar &&\n' span_id:731) (Token id:Id.Lit_Chars val:'\t\techo hello > foo/world &&\n' span_id:732) (Token id:Id.Lit_Chars val:'\t\techo hello > bar/world &&\n' span_id:733) (Token id:Id.Lit_Chars val:'\t\tgit add foo/world bar/world &&\n' span_id:734) (Token id:Id.Lit_Chars val:'\t\tgit commit -q -mone &&\n' span_id:735) (Token id:Id.Lit_Chars val:'\t\tgit rm -r foo &&\n' span_id:736) (Token id:Id.Lit_Chars val:'\t\ttest_ln_s_add bar foo &&\n' span_id:737) (Token id:Id.Lit_Chars val:'\t\tgit commit -q -mtwo\n' span_id:738) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:739) (Token id:Id.Lit_Chars val:'\t(\n' span_id:740) (Token id:Id.Lit_Chars val:'\t\tcd dirtosymlink &&\n' span_id:741) (Token id:Id.Lit_Chars val:'\t\tgit fast-export master -- foo |\n' span_id:742) (Token id: Id.Lit_Chars val: '\t\t(cd ../result && git fast-import --quiet)\n' span_id: 743 ) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:744) (Token id:Id.Lit_Chars val:'\t(cd result && git show master:foo)\n' span_id:745) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'fast-export quotes pathnames' span_id:752))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:756) (Token id:Id.Lit_Chars val:'\tgit init crazy-paths &&\n' span_id:757) (Token id:Id.Lit_Chars val:'\t(cd crazy-paths &&\n' span_id:758) (Token id: Id.Lit_Chars val: '\t blob=$(echo foo | git hash-object -w --stdin) &&\n' span_id: 759 ) (Token id:Id.Lit_Chars val:'\t git update-index --add \\\n' span_id:760) (Token id: Id.Lit_Chars val: '\t\t--cacheinfo 100644 $blob "$(printf "path with\\\\nnewline")" \\\n' span_id: 761 ) (Token id:Id.Lit_Chars val:'\t\t--cacheinfo 100644 $blob "path with \\"quote\\"" \\\n' span_id:762) (Token id: Id.Lit_Chars val: '\t\t--cacheinfo 100644 $blob "path with \\\\backslash" \\\n' span_id: 763 ) (Token id:Id.Lit_Chars val:'\t\t--cacheinfo 100644 $blob "path with space" &&\n' span_id:764) (Token id:Id.Lit_Chars val:'\t git commit -m addition &&\n' span_id:765) (Token id: Id.Lit_Chars val: '\t git ls-files -z -s | perl -0pe "s{\\\\t}{$&subdir/}" >index &&\n' span_id: 766 ) (Token id:Id.Lit_Chars val:'\t git read-tree --empty &&\n' span_id:767) (Token id: Id.Lit_Chars val: '\t git update-index -z --index-info <index &&\n' span_id: 768 ) (Token id:Id.Lit_Chars val:'\t git commit -m rename &&\n' span_id:769) (Token id:Id.Lit_Chars val:'\t git read-tree --empty &&\n' span_id:770) (Token id:Id.Lit_Chars val:'\t git commit -m deletion &&\n' span_id:771) (Token id: Id.Lit_Chars val: '\t git fast-export -M HEAD >export.out &&\n' span_id: 772 ) (Token id:Id.Lit_Chars val:'\t git rev-list HEAD >expect &&\n' span_id:773) (Token id:Id.Lit_Chars val:'\t git init result &&\n' span_id:774) (Token id:Id.Lit_Chars val:'\t cd result &&\n' span_id:775) (Token id:Id.Lit_Chars val:'\t git fast-import <../export.out &&\n' span_id:776) (Token id:Id.Lit_Chars val:'\t git rev-list HEAD >actual &&\n' span_id:777) (Token id:Id.Lit_Chars val:'\t test_cmp ../expect actual\n' span_id:778) (Token id:Id.Lit_Chars val:'\t)\n' span_id:779) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'test bidirectionality' span_id:786))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:790) (Token id:Id.Lit_Chars val:'\t>marks-cur &&\n' span_id:791) (Token id:Id.Lit_Chars val:'\t>marks-new &&\n' span_id:792) (Token id:Id.Lit_Chars val:'\tgit init marks-test &&\n' span_id:793) (Token id: Id.Lit_Chars val: '\tgit fast-export --export-marks=marks-cur --import-marks=marks-cur --branches | \\\n' span_id: 794 ) (Token id: Id.Lit_Chars val: '\tgit --git-dir=marks-test/.git fast-import --export-marks=marks-new --import-marks=marks-new &&\n' span_id: 795 ) (Token id:Id.Lit_Chars val:'\t(cd marks-test &&\n' span_id:796) (Token id:Id.Lit_Chars val:'\tgit reset --hard &&\n' span_id:797) (Token id:Id.Lit_Chars val:'\techo Wohlauf > file &&\n' span_id:798) (Token id:Id.Lit_Chars val:'\tgit commit -a -m "back in time") &&\n' span_id:799) (Token id: Id.Lit_Chars val: '\tgit --git-dir=marks-test/.git fast-export --export-marks=marks-new --import-marks=marks-new --branches | \\\n' span_id: 800 ) (Token id: Id.Lit_Chars val: '\tgit fast-import --export-marks=marks-cur --import-marks=marks-cur\n' span_id: 801 ) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:807) fd: -1 arg_word: {(expected)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:811) fd: -1 here_begin: {(EOF)} here_end_span_id: 830 stdin_parts: [ ('blob\n') ('mark :13\n') ('data 5\n') ('bump\n') ('\n') ('commit refs/heads/master\n') ('mark :14\n') ('author A U Thor <author@example.com> 1112912773 -0700\n') ('committer C O Mitter <committer@example.com> 1112912773 -0700\n') ('data 5\n') ('bump\n') ('from :12\n') ('M 100644 :13 file\n') ('\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'avoid uninteresting refs' span_id:835))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:839) (Token id:Id.Lit_Chars val:'\t> tmp-marks &&\n' span_id:840) (Token id:Id.Lit_Chars val:'\tgit fast-export --import-marks=tmp-marks \\\n' span_id:841) (Token id: Id.Lit_Chars val: '\t\t--export-marks=tmp-marks master > /dev/null &&\n' span_id: 842 ) (Token id:Id.Lit_Chars val:'\tgit tag v1.0 &&\n' span_id:843) (Token id:Id.Lit_Chars val:'\tgit branch uninteresting &&\n' span_id:844) (Token id:Id.Lit_Chars val:'\techo bump > file &&\n' span_id:845) (Token id:Id.Lit_Chars val:'\tgit commit -a -m bump &&\n' span_id:846) (Token id:Id.Lit_Chars val:'\tgit fast-export --import-marks=tmp-marks \\\n' span_id:847) (Token id: Id.Lit_Chars val: '\t\t--export-marks=tmp-marks ^uninteresting ^v1.0 master > actual &&\n' span_id: 848 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expected actual\n' span_id:849) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:855) fd: -1 arg_word: {(expected)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:859) fd: -1 here_begin: {(EOF)} here_end_span_id: 867 stdin_parts: [('reset refs/heads/master\n') ('from :14\n') ('\n')] ) ] ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'refs are updated even if no commits need to be exported' span_id: 872 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:876) (Token id:Id.Lit_Chars val:'\t> tmp-marks &&\n' span_id:877) (Token id:Id.Lit_Chars val:'\tgit fast-export --import-marks=tmp-marks \\\n' span_id:878) (Token id: Id.Lit_Chars val: '\t\t--export-marks=tmp-marks master > /dev/null &&\n' span_id: 879 ) (Token id:Id.Lit_Chars val:'\tgit fast-export --import-marks=tmp-marks \\\n' span_id:880) (Token id: Id.Lit_Chars val: '\t\t--export-marks=tmp-marks master > actual &&\n' span_id: 881 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expected actual\n' span_id:882) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'use refspec' span_id:889))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:893) (Token id: Id.Lit_Chars val: '\tgit fast-export --refspec refs/heads/master:refs/heads/foobar master | \\\n' span_id: 894 ) (Token id:Id.Lit_Chars val:'\t\tgrep "^commit " | sort | uniq > actual &&\n' span_id:895) (Token id: Id.Lit_Chars val: '\techo "commit refs/heads/foobar" > expected &&\n' span_id: 896 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expected actual\n' span_id:897) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'delete refspec' span_id:904))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:908) (Token id:Id.Lit_Chars val:'\tgit branch to-delete &&\n' span_id:909) (Token id: Id.Lit_Chars val: '\tgit fast-export --refspec :refs/heads/to-delete to-delete ^to-delete > actual &&\n' span_id: 910 ) (Token id:Id.Lit_Chars val:'\tcat > expected <<-EOF &&\n' span_id:911) (Token id:Id.Lit_Chars val:'\treset refs/heads/to-delete\n' span_id:912) (Token id:Id.Lit_Chars val:'\tfrom 0000000000000000000000000000000000000000\n' span_id:913) (Token id:Id.Lit_Chars val:'\n' span_id:914) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:915) (Token id:Id.Lit_Chars val:'\ttest_cmp expected actual\n' span_id:916) ) } ) (C {(test_done)}) ] )