(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 rerere\n' span_id:15) (Token id:Id.Lit_Chars val:'\n' span_id:16) (Token id:Id.Lit_Chars val:'! [fifth] version1\n' span_id:17) (Token id:Id.Lit_Chars val:' ! [first] first\n' span_id:18) (Token id:Id.Lit_Chars val:' ! [fourth] version1\n' span_id:19) (Token id:Id.Lit_Chars val:' ! [master] initial\n' span_id:20) (Token id:Id.Lit_Chars val:' ! [second] prefer first over second\n' span_id:21) (Token id:Id.Lit_Chars val:' ! [third] version2\n' span_id:22) (Token id:Id.Lit_Chars val:'------\n' span_id:23) (Token id:Id.Lit_Chars val:' + [third] version2\n' span_id:24) (Token id:Id.Lit_Chars val:'+ [fifth] version1\n' span_id:25) (Token id:Id.Lit_Chars val:' + [fourth] version1\n' span_id:26) (Token id:Id.Lit_Chars val:'+ + + [third^] third\n' span_id:27) (Token id: Id.Lit_Chars val: ' - [second] prefer first over second\n' span_id: 28 ) (Token id:Id.Lit_Chars val:' + + [first] first\n' span_id:29) (Token id:Id.Lit_Chars val:' + [second^] second\n' span_id:30) (Token id:Id.Lit_Chars val:'++++++ [master] initial\n' span_id:31) ) } spids: [13] ) ] ) (C {(.)} {(./test-lib.sh)}) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:setup span_id:43))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:47) (Token id:Id.Lit_Chars val:'\tcat >a1 <<-\\EOF &&\n' span_id:48) (Token id:Id.Lit_Chars val:'\tSome title\n' span_id:49) (Token id:Id.Lit_Chars val:'\t==========\n' span_id:50) (Token id:Id.Lit_Chars val:'\tWhether ' span_id:51) ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:"\\'" span_id:53)) (SQ (Token id:Id.Lit_Chars val:'tis nobler in the mind to suffer\n' span_id:55) (Token id: Id.Lit_Chars val: '\tThe slings and arrows of outrageous fortune,\n' span_id: 56 ) (Token id:Id.Lit_Chars val:'\tOr to take arms against a sea of troubles,\n' span_id:57) (Token id: Id.Lit_Chars val: '\tAnd by opposing end them? To die: to sleep;\n' span_id: 58 ) (Token id:Id.Lit_Chars val:'\tNo more; and by a sleep to say we end\n' span_id:59) (Token id: Id.Lit_Chars val: '\tThe heart-ache and the thousand natural shocks\n' span_id: 60 ) (Token id:Id.Lit_Chars val:'\tThat flesh is heir to, ' span_id:61) ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:"\\'" span_id:63)) (SQ (Token id:Id.Lit_Chars val:'tis a consummation\n' span_id:65) (Token id:Id.Lit_Chars val:'\tDevoutly to be wish' span_id:66) ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:"\\'" span_id:68)) (SQ (Token id:Id.Lit_Chars val:'d.\n' span_id:70) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:71) (Token id:Id.Lit_Chars val:'\n' span_id:72) (Token id:Id.Lit_Chars val:'\tgit add a1 &&\n' span_id:73) (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:74) (Token id:Id.Lit_Chars val:'\tgit commit -q -a -m initial &&\n' span_id:75) (Token id:Id.Lit_Chars val:'\n' span_id:76) (Token id:Id.Lit_Chars val:'\tcat >>a1 <<-\\EOF &&\n' span_id:77) (Token id:Id.Lit_Chars val:'\tSome title\n' span_id:78) (Token id:Id.Lit_Chars val:'\t==========\n' span_id:79) (Token id:Id.Lit_Chars val:'\tTo die, to sleep;\n' span_id:80) (Token id:Id.Lit_Chars val:'\tTo sleep: perchance to dream: ay, there' span_id:81) ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:"\\'" span_id:83)) (SQ (Token id:Id.Lit_Chars val:'s the rub;\n' span_id:85) (Token id: Id.Lit_Chars val: '\tFor in that sleep of death what dreams may come\n' span_id: 86 ) (Token id:Id.Lit_Chars val:'\tWhen we have shuffled off this mortal coil,\n' span_id:87) (Token id:Id.Lit_Chars val:'\tMust give us pause: there' span_id:88) ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:"\\'" span_id:90)) (SQ (Token id:Id.Lit_Chars val:'s the respect\n' span_id:92) (Token id:Id.Lit_Chars val:'\tThat makes calamity of so long life;\n' span_id:93) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:94) (Token id:Id.Lit_Chars val:'\n' span_id:95) (Token id:Id.Lit_Chars val:'\tgit checkout -b first &&\n' span_id:96) (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:97) (Token id:Id.Lit_Chars val:'\tgit commit -q -a -m first &&\n' span_id:98) (Token id:Id.Lit_Chars val:'\n' span_id:99) (Token id:Id.Lit_Chars val:'\tgit checkout -b second master &&\n' span_id:100) (Token id:Id.Lit_Chars val:'\tgit show first:a1 |\n' span_id:101) (Token id: Id.Lit_Chars val: '\tsed -e "s/To die, t/To die! T/" -e "s/Some title/Some Title/" >a1 &&\n' span_id: 102 ) (Token id:Id.Lit_Chars val:'\techo "* END *" >>a1 &&\n' span_id:103) (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:104) (Token id:Id.Lit_Chars val:'\tgit commit -q -a -m second\n' span_id:105) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'nothing recorded without rerere' span_id:112))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:116) (Token id:Id.Lit_Chars val:'\trm -rf .git/rr-cache &&\n' span_id:117) (Token id:Id.Lit_Chars val:'\tgit config rerere.enabled false &&\n' span_id:118) (Token id:Id.Lit_Chars val:'\ttest_must_fail git merge first &&\n' span_id:119) (Token id:Id.Lit_Chars val:'\t! test -d .git/rr-cache\n' span_id:120) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'activate rerere, old style (conflicting merge)' span_id:127))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:131) (Token id:Id.Lit_Chars val:'\tgit reset --hard &&\n' span_id:132) (Token id:Id.Lit_Chars val:'\tmkdir .git/rr-cache &&\n' span_id:133) (Token id: Id.Lit_Chars val: '\ttest_might_fail git config --unset rerere.enabled &&\n' span_id: 134 ) (Token id:Id.Lit_Chars val:'\ttest_must_fail git merge first &&\n' span_id:135) (Token id:Id.Lit_Chars val:'\n' span_id:136) (Token id:Id.Lit_Chars val:'\tsha1=$(perl -pe "s/\t.*//" .git/MERGE_RR) &&\n' span_id:137) (Token id:Id.Lit_Chars val:'\trr=.git/rr-cache/$sha1 &&\n' span_id:138) (Token id:Id.Lit_Chars val:'\tgrep "^=======\\$" $rr/preimage &&\n' span_id:139) (Token id:Id.Lit_Chars val:'\t! test -f $rr/postimage &&\n' span_id:140) (Token id:Id.Lit_Chars val:'\t! test -f $rr/thisimage\n' span_id:141) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'rerere.enabled works, too' span_id:148))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:152) (Token id:Id.Lit_Chars val:'\trm -rf .git/rr-cache &&\n' span_id:153) (Token id:Id.Lit_Chars val:'\tgit config rerere.enabled true &&\n' span_id:154) (Token id:Id.Lit_Chars val:'\tgit reset --hard &&\n' span_id:155) (Token id:Id.Lit_Chars val:'\ttest_must_fail git merge first &&\n' span_id:156) (Token id:Id.Lit_Chars val:'\n' span_id:157) (Token id:Id.Lit_Chars val:'\tsha1=$(perl -pe "s/\t.*//" .git/MERGE_RR) &&\n' span_id:158) (Token id:Id.Lit_Chars val:'\trr=.git/rr-cache/$sha1 &&\n' span_id:159) (Token id:Id.Lit_Chars val:'\tgrep ^=======$ $rr/preimage\n' span_id:160) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'set up rr-cache' span_id:167))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:171) (Token id:Id.Lit_Chars val:'\trm -rf .git/rr-cache &&\n' span_id:172) (Token id:Id.Lit_Chars val:'\tgit config rerere.enabled true &&\n' span_id:173) (Token id:Id.Lit_Chars val:'\tgit reset --hard &&\n' span_id:174) (Token id:Id.Lit_Chars val:'\ttest_must_fail git merge first &&\n' span_id:175) (Token id: Id.Lit_Chars val: '\tsha1=$(perl -pe "s/\t.*//" .git/MERGE_RR) &&\n' span_id: 176 ) (Token id:Id.Lit_Chars val:'\trr=.git/rr-cache/$sha1\n' span_id:177) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'rr-cache looks sane' span_id:184))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:188) (Token id:Id.Lit_Chars val:'\t# no postimage or thisimage yet\n' span_id:189) (Token id:Id.Lit_Chars val:'\t! test -f $rr/postimage &&\n' span_id:190) (Token id:Id.Lit_Chars val:'\t! test -f $rr/thisimage &&\n' span_id:191) (Token id:Id.Lit_Chars val:'\n' span_id:192) (Token id: Id.Lit_Chars val: '\t# preimage has right number of lines\n' span_id: 193 ) (Token id: Id.Lit_Chars val: '\tcnt=$(sed -ne "/^<<<<<<</,/^>>>>>>>/p" $rr/preimage | wc -l) &&\n' span_id: 194 ) (Token id:Id.Lit_Chars val:'\techo $cnt &&\n' span_id:195) (Token id:Id.Lit_Chars val:'\ttest $cnt = 13\n' span_id:196) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'rerere diff' span_id:203))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:207) (Token id:Id.Lit_Chars val:'\tgit show first:a1 >a1 &&\n' span_id:208) (Token id:Id.Lit_Chars val:'\tcat >expect <<-\\EOF &&\n' span_id:209) (Token id:Id.Lit_Chars val:'\t--- a/a1\n' span_id:210) (Token id:Id.Lit_Chars val:'\t+++ b/a1\n' span_id:211) (Token id:Id.Lit_Chars val:'\t@@ -1,4 +1,4 @@\n' span_id:212) (Token id:Id.Lit_Chars val:'\t-Some Title\n' span_id:213) (Token id:Id.Lit_Chars val:'\t+Some title\n' span_id:214) (Token id:Id.Lit_Chars val:'\t ==========\n' span_id:215) (Token id:Id.Lit_Chars val:'\t Whether ' span_id:216) ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:"\\'" span_id:218)) (SQ (Token id:Id.Lit_Chars val:'tis nobler in the mind to suffer\n' span_id:220) (Token id: Id.Lit_Chars val: '\t The slings and arrows of outrageous fortune,\n' span_id: 221 ) (Token id:Id.Lit_Chars val:'\t@@ -8,21 +8,11 @@\n' span_id:222) (Token id: Id.Lit_Chars val: '\t The heart-ache and the thousand natural shocks\n' span_id: 223 ) (Token id:Id.Lit_Chars val:'\t That flesh is heir to, ' span_id:224) ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:"\\'" span_id:226)) (SQ (Token id:Id.Lit_Chars val:'tis a consummation\n' span_id:228) (Token id:Id.Lit_Chars val:'\t Devoutly to be wish' span_id:229) ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:"\\'" span_id:231)) (SQ (Token id:Id.Lit_Chars val:'d.\n' span_id:233) (Token id:Id.Lit_Chars val:'\t-<<<<<<<\n' span_id:234) (Token id:Id.Lit_Chars val:'\t-Some Title\n' span_id:235) (Token id:Id.Lit_Chars val:'\t-==========\n' span_id:236) (Token id:Id.Lit_Chars val:'\t-To die! To sleep;\n' span_id:237) (Token id:Id.Lit_Chars val:'\t-=======\n' span_id:238) (Token id:Id.Lit_Chars val:'\t Some title\n' span_id:239) (Token id:Id.Lit_Chars val:'\t ==========\n' span_id:240) (Token id:Id.Lit_Chars val:'\t To die, to sleep;\n' span_id:241) (Token id:Id.Lit_Chars val:'\t->>>>>>>\n' span_id:242) (Token id:Id.Lit_Chars val:'\t To sleep: perchance to dream: ay, there' span_id:243) ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:"\\'" span_id:245)) (SQ (Token id:Id.Lit_Chars val:'s the rub;\n' span_id:247) (Token id: Id.Lit_Chars val: '\t For in that sleep of death what dreams may come\n' span_id: 248 ) (Token id:Id.Lit_Chars val:'\t When we have shuffled off this mortal coil,\n' span_id:249) (Token id:Id.Lit_Chars val:'\t Must give us pause: there' span_id:250) ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:"\\'" span_id:252)) (SQ (Token id:Id.Lit_Chars val:'s the respect\n' span_id:254) (Token id: Id.Lit_Chars val: '\t That makes calamity of so long life;\n' span_id: 255 ) (Token id:Id.Lit_Chars val:'\t-<<<<<<<\n' span_id:256) (Token id:Id.Lit_Chars val:'\t-=======\n' span_id:257) (Token id:Id.Lit_Chars val:'\t-* END *\n' span_id:258) (Token id:Id.Lit_Chars val:'\t->>>>>>>\n' span_id:259) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:260) (Token id:Id.Lit_Chars val:'\tgit rerere diff >out &&\n' span_id:261) (Token id:Id.Lit_Chars val:'\ttest_cmp expect out\n' span_id:262) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'rerere status' span_id:269))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:273) (Token id:Id.Lit_Chars val:'\techo a1 >expect &&\n' span_id:274) (Token id:Id.Lit_Chars val:'\tgit rerere status >out &&\n' span_id:275) (Token id:Id.Lit_Chars val:'\ttest_cmp expect out\n' span_id:276) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'first postimage wins' span_id:283))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:287) (Token id: Id.Lit_Chars val: '\tgit show first:a1 | sed "s/To die: t/To die! T/" >expect &&\n' span_id: 288 ) (Token id:Id.Lit_Chars val:'\n' span_id:289) (Token id: Id.Lit_Chars val: '\tgit commit -q -a -m "prefer first over second" &&\n' span_id: 290 ) (Token id:Id.Lit_Chars val:'\ttest -f $rr/postimage &&\n' span_id:291) (Token id:Id.Lit_Chars val:'\n' span_id:292) (Token id: Id.Lit_Chars val: '\toldmtimepost=$(test-chmtime -v -60 $rr/postimage | cut -f 1) &&\n' span_id: 293 ) (Token id:Id.Lit_Chars val:'\n' span_id:294) (Token id:Id.Lit_Chars val:'\tgit checkout -b third master &&\n' span_id:295) (Token id: Id.Lit_Chars val: '\tgit show second^:a1 | sed "s/To die: t/To die! T/" >a1 &&\n' span_id: 296 ) (Token id:Id.Lit_Chars val:'\tgit commit -q -a -m third &&\n' span_id:297) (Token id:Id.Lit_Chars val:'\n' span_id:298) (Token id:Id.Lit_Chars val:'\ttest_must_fail git merge first &&\n' span_id:299) (Token id:Id.Lit_Chars val:'\t# rerere kicked in\n' span_id:300) (Token id:Id.Lit_Chars val:'\t! grep "^=======\\$" a1 &&\n' span_id:301) (Token id:Id.Lit_Chars val:'\ttest_cmp expect a1\n' span_id:302) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'rerere updates postimage timestamp' span_id:309))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:313) (Token id: Id.Lit_Chars val: '\tnewmtimepost=$(test-chmtime -v +0 $rr/postimage | cut -f 1) &&\n' span_id: 314 ) (Token id:Id.Lit_Chars val:'\ttest $oldmtimepost -lt $newmtimepost\n' span_id:315) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'rerere clear' span_id:322))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:326) (Token id:Id.Lit_Chars val:'\tmv $rr/postimage .git/post-saved &&\n' span_id:327) (Token id: Id.Lit_Chars val: '\techo "$sha1\ta1" | perl -pe "y/\\012/\\000/" >.git/MERGE_RR &&\n' span_id: 328 ) (Token id:Id.Lit_Chars val:'\tgit rerere clear &&\n' span_id:329) (Token id:Id.Lit_Chars val:'\t! test -d $rr\n' span_id:330) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'leftover directory' span_id:337))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:341) (Token id:Id.Lit_Chars val:'\tgit reset --hard &&\n' span_id:342) (Token id:Id.Lit_Chars val:'\tmkdir -p $rr &&\n' span_id:343) (Token id:Id.Lit_Chars val:'\ttest_must_fail git merge first &&\n' span_id:344) (Token id:Id.Lit_Chars val:'\ttest -f $rr/preimage\n' span_id:345) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'missing preimage' span_id:352))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:356) (Token id:Id.Lit_Chars val:'\tgit reset --hard &&\n' span_id:357) (Token id:Id.Lit_Chars val:'\tmkdir -p $rr &&\n' span_id:358) (Token id:Id.Lit_Chars val:'\tcp .git/post-saved $rr/postimage &&\n' span_id:359) (Token id:Id.Lit_Chars val:'\ttest_must_fail git merge first &&\n' span_id:360) (Token id:Id.Lit_Chars val:'\ttest -f $rr/preimage\n' span_id:361) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'set up for garbage collection tests' span_id:368))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:372) (Token id:Id.Lit_Chars val:'\tmkdir -p $rr &&\n' span_id:373) (Token id:Id.Lit_Chars val:'\techo Hello >$rr/preimage &&\n' span_id:374) (Token id:Id.Lit_Chars val:'\techo World >$rr/postimage &&\n' span_id:375) (Token id:Id.Lit_Chars val:'\n' span_id:376) (Token id: Id.Lit_Chars val: '\tsha2=4000000000000000000000000000000000000000 &&\n' span_id: 377 ) (Token id:Id.Lit_Chars val:'\trr2=.git/rr-cache/$sha2 &&\n' span_id:378) (Token id:Id.Lit_Chars val:'\tmkdir $rr2 &&\n' span_id:379) (Token id:Id.Lit_Chars val:'\techo Hello >$rr2/preimage &&\n' span_id:380) (Token id:Id.Lit_Chars val:'\n' span_id:381) (Token id:Id.Lit_Chars val:'\talmost_15_days_ago=$((60-15*86400)) &&\n' span_id:382) (Token id: Id.Lit_Chars val: '\tjust_over_15_days_ago=$((-1-15*86400)) &&\n' span_id: 383 ) (Token id:Id.Lit_Chars val:'\talmost_60_days_ago=$((60-60*86400)) &&\n' span_id:384) (Token id: Id.Lit_Chars val: '\tjust_over_60_days_ago=$((-1-60*86400)) &&\n' span_id: 385 ) (Token id:Id.Lit_Chars val:'\n' span_id:386) (Token id: Id.Lit_Chars val: '\ttest-chmtime =$just_over_60_days_ago $rr/preimage &&\n' span_id: 387 ) (Token id:Id.Lit_Chars val:'\ttest-chmtime =$almost_60_days_ago $rr/postimage &&\n' span_id:388) (Token id: Id.Lit_Chars val: '\ttest-chmtime =$almost_15_days_ago $rr2/preimage\n' span_id: 389 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'gc preserves young or recently used records' span_id:396))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:400) (Token id:Id.Lit_Chars val:'\tgit rerere gc &&\n' span_id:401) (Token id:Id.Lit_Chars val:'\ttest -f $rr/preimage &&\n' span_id:402) (Token id:Id.Lit_Chars val:'\ttest -f $rr2/preimage\n' span_id:403) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'old records rest in peace' span_id:410))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:414) (Token id: Id.Lit_Chars val: '\ttest-chmtime =$just_over_60_days_ago $rr/postimage &&\n' span_id: 415 ) (Token id:Id.Lit_Chars val:'\ttest-chmtime =$just_over_15_days_ago $rr2/preimage &&\n' span_id:416) (Token id:Id.Lit_Chars val:'\tgit rerere gc &&\n' span_id:417) (Token id:Id.Lit_Chars val:'\t! test -f $rr/preimage &&\n' span_id:418) (Token id:Id.Lit_Chars val:'\t! test -f $rr2/preimage\n' span_id:419) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'setup: file2 added differently in two branches' span_id:426))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:430) (Token id:Id.Lit_Chars val:'\tgit reset --hard &&\n' span_id:431) (Token id:Id.Lit_Chars val:'\n' span_id:432) (Token id:Id.Lit_Chars val:'\tgit checkout -b fourth &&\n' span_id:433) (Token id:Id.Lit_Chars val:'\techo Hallo >file2 &&\n' span_id:434) (Token id:Id.Lit_Chars val:'\tgit add file2 &&\n' span_id:435) (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:436) (Token id:Id.Lit_Chars val:'\tgit commit -m version1 &&\n' span_id:437) (Token id:Id.Lit_Chars val:'\n' span_id:438) (Token id:Id.Lit_Chars val:'\tgit checkout third &&\n' span_id:439) (Token id:Id.Lit_Chars val:'\techo Bello >file2 &&\n' span_id:440) (Token id:Id.Lit_Chars val:'\tgit add file2 &&\n' span_id:441) (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:442) (Token id:Id.Lit_Chars val:'\tgit commit -m version2 &&\n' span_id:443) (Token id:Id.Lit_Chars val:'\n' span_id:444) (Token id:Id.Lit_Chars val:'\ttest_must_fail git merge fourth &&\n' span_id:445) (Token id:Id.Lit_Chars val:'\techo Cello >file2 &&\n' span_id:446) (Token id:Id.Lit_Chars val:'\tgit add file2 &&\n' span_id:447) (Token id:Id.Lit_Chars val:'\tgit commit -m resolution\n' span_id:448) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'resolution was recorded properly' span_id:455))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:459) (Token id:Id.Lit_Chars val:'\techo Cello >expected &&\n' span_id:460) (Token id:Id.Lit_Chars val:'\n' span_id:461) (Token id:Id.Lit_Chars val:'\tgit reset --hard HEAD~2 &&\n' span_id:462) (Token id:Id.Lit_Chars val:'\tgit checkout -b fifth &&\n' span_id:463) (Token id:Id.Lit_Chars val:'\n' span_id:464) (Token id:Id.Lit_Chars val:'\techo Hallo >file3 &&\n' span_id:465) (Token id:Id.Lit_Chars val:'\tgit add file3 &&\n' span_id:466) (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:467) (Token id:Id.Lit_Chars val:'\tgit commit -m version1 &&\n' span_id:468) (Token id:Id.Lit_Chars val:'\n' span_id:469) (Token id:Id.Lit_Chars val:'\tgit checkout third &&\n' span_id:470) (Token id:Id.Lit_Chars val:'\techo Bello >file3 &&\n' span_id:471) (Token id:Id.Lit_Chars val:'\tgit add file3 &&\n' span_id:472) (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:473) (Token id:Id.Lit_Chars val:'\tgit commit -m version2 &&\n' span_id:474) (Token id:Id.Lit_Chars val:'\tgit tag version2 &&\n' span_id:475) (Token id:Id.Lit_Chars val:'\n' span_id:476) (Token id:Id.Lit_Chars val:'\ttest_must_fail git merge fifth &&\n' span_id:477) (Token id:Id.Lit_Chars val:'\ttest_cmp expected file3 &&\n' span_id:478) (Token id:Id.Lit_Chars val:'\ttest_must_fail git update-index --refresh\n' span_id:479) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:rerere.autoupdate span_id:486))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:490) (Token id: Id.Lit_Chars val: '\tgit config rerere.autoupdate true &&\n' span_id: 491 ) (Token id:Id.Lit_Chars val:'\tgit reset --hard &&\n' span_id:492) (Token id:Id.Lit_Chars val:'\tgit checkout version2 &&\n' span_id:493) (Token id:Id.Lit_Chars val:'\ttest_must_fail git merge fifth &&\n' span_id:494) (Token id:Id.Lit_Chars val:'\tgit update-index --refresh\n' span_id:495) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'merge --rerere-autoupdate' span_id:502))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:506) (Token id: Id.Lit_Chars val: '\ttest_might_fail git config --unset rerere.autoupdate &&\n' span_id: 507 ) (Token id:Id.Lit_Chars val:'\tgit reset --hard &&\n' span_id:508) (Token id:Id.Lit_Chars val:'\tgit checkout version2 &&\n' span_id:509) (Token id:Id.Lit_Chars val:'\ttest_must_fail git merge --rerere-autoupdate fifth &&\n' span_id:510) (Token id:Id.Lit_Chars val:'\tgit update-index --refresh\n' span_id:511) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'merge --no-rerere-autoupdate' span_id:518))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:522) (Token id: Id.Lit_Chars val: '\theadblob=$(git rev-parse version2:file3) &&\n' span_id: 523 ) (Token id:Id.Lit_Chars val:'\tmergeblob=$(git rev-parse fifth:file3) &&\n' span_id:524) (Token id:Id.Lit_Chars val:'\tcat >expected <<-EOF &&\n' span_id:525) (Token id:Id.Lit_Chars val:'\t100644 $headblob 2\tfile3\n' span_id:526) (Token id:Id.Lit_Chars val:'\t100644 $mergeblob 3\tfile3\n' span_id:527) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:528) (Token id:Id.Lit_Chars val:'\n' span_id:529) (Token id: Id.Lit_Chars val: '\tgit config rerere.autoupdate true &&\n' span_id: 530 ) (Token id:Id.Lit_Chars val:'\tgit reset --hard &&\n' span_id:531) (Token id:Id.Lit_Chars val:'\tgit checkout version2 &&\n' span_id:532) (Token id: Id.Lit_Chars val: '\ttest_must_fail git merge --no-rerere-autoupdate fifth &&\n' span_id: 533 ) (Token id:Id.Lit_Chars val:'\tgit ls-files -u >actual &&\n' span_id:534) (Token id:Id.Lit_Chars val:'\ttest_cmp expected actual\n' span_id:535) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'set up an unresolved merge' span_id:542))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:546) (Token id: Id.Lit_Chars val: '\theadblob=$(git rev-parse version2:file3) &&\n' span_id: 547 ) (Token id:Id.Lit_Chars val:'\tmergeblob=$(git rev-parse fifth:file3) &&\n' span_id:548) (Token id:Id.Lit_Chars val:'\tcat >expected.unresolved <<-EOF &&\n' span_id:549) (Token id:Id.Lit_Chars val:'\t100644 $headblob 2\tfile3\n' span_id:550) (Token id:Id.Lit_Chars val:'\t100644 $mergeblob 3\tfile3\n' span_id:551) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:552) (Token id:Id.Lit_Chars val:'\n' span_id:553) (Token id: Id.Lit_Chars val: '\ttest_might_fail git config --unset rerere.autoupdate &&\n' span_id: 554 ) (Token id:Id.Lit_Chars val:'\tgit reset --hard &&\n' span_id:555) (Token id:Id.Lit_Chars val:'\tgit checkout version2 &&\n' span_id:556) (Token id:Id.Lit_Chars val:'\tfifth=$(git rev-parse fifth) &&\n' span_id:557) (Token id:Id.Lit_Chars val:'\techo "$fifth\t\tbranch ' span_id:558) ) (fifth) (SQ (Token id:Id.Lit_Chars val:' of ." |\n' span_id:562) (Token id:Id.Lit_Chars val:'\tgit fmt-merge-msg >msg &&\n' span_id:563) (Token id:Id.Lit_Chars val:'\tancestor=$(git merge-base version2 fifth) &&\n' span_id:564) (Token id: Id.Lit_Chars val: '\ttest_must_fail git merge-recursive "$ancestor" -- HEAD fifth &&\n' span_id: 565 ) (Token id:Id.Lit_Chars val:'\n' span_id:566) (Token id: Id.Lit_Chars val: '\tgit ls-files --stage >failedmerge &&\n' span_id: 567 ) (Token id:Id.Lit_Chars val:'\tcp file3 file3.conflict &&\n' span_id:568) (Token id:Id.Lit_Chars val:'\n' span_id:569) (Token id:Id.Lit_Chars val:'\tgit ls-files -u >actual &&\n' span_id:570) (Token id:Id.Lit_Chars val:'\ttest_cmp expected.unresolved actual\n' span_id:571) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'explicit rerere' span_id:578))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:582) (Token id: Id.Lit_Chars val: '\ttest_might_fail git config --unset rerere.autoupdate &&\n' span_id: 583 ) (Token id:Id.Lit_Chars val:'\tgit rm -fr --cached . &&\n' span_id:584) (Token id: Id.Lit_Chars val: '\tgit update-index --index-info <failedmerge &&\n' span_id: 585 ) (Token id:Id.Lit_Chars val:'\tcp file3.conflict file3 &&\n' span_id:586) (Token id: Id.Lit_Chars val: '\ttest_must_fail git update-index --refresh -q &&\n' span_id: 587 ) (Token id:Id.Lit_Chars val:'\n' span_id:588) (Token id:Id.Lit_Chars val:'\tgit rerere &&\n' span_id:589) (Token id:Id.Lit_Chars val:'\tgit ls-files -u >actual &&\n' span_id:590) (Token id:Id.Lit_Chars val:'\ttest_cmp expected.unresolved actual\n' span_id:591) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'explicit rerere with autoupdate' span_id:598))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:602) (Token id: Id.Lit_Chars val: '\tgit config rerere.autoupdate true &&\n' span_id: 603 ) (Token id:Id.Lit_Chars val:'\tgit rm -fr --cached . &&\n' span_id:604) (Token id: Id.Lit_Chars val: '\tgit update-index --index-info <failedmerge &&\n' span_id: 605 ) (Token id:Id.Lit_Chars val:'\tcp file3.conflict file3 &&\n' span_id:606) (Token id: Id.Lit_Chars val: '\ttest_must_fail git update-index --refresh -q &&\n' span_id: 607 ) (Token id:Id.Lit_Chars val:'\n' span_id:608) (Token id:Id.Lit_Chars val:'\tgit rerere &&\n' span_id:609) (Token id:Id.Lit_Chars val:'\tgit update-index --refresh\n' span_id:610) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'explicit rerere --rerere-autoupdate overrides' span_id:617))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:621) (Token id: Id.Lit_Chars val: '\tgit config rerere.autoupdate false &&\n' span_id: 622 ) (Token id:Id.Lit_Chars val:'\tgit rm -fr --cached . &&\n' span_id:623) (Token id: Id.Lit_Chars val: '\tgit update-index --index-info <failedmerge &&\n' span_id: 624 ) (Token id:Id.Lit_Chars val:'\tcp file3.conflict file3 &&\n' span_id:625) (Token id:Id.Lit_Chars val:'\tgit rerere &&\n' span_id:626) (Token id:Id.Lit_Chars val:'\tgit ls-files -u >actual1 &&\n' span_id:627) (Token id:Id.Lit_Chars val:'\n' span_id:628) (Token id:Id.Lit_Chars val:'\tgit rm -fr --cached . &&\n' span_id:629) (Token id: Id.Lit_Chars val: '\tgit update-index --index-info <failedmerge &&\n' span_id: 630 ) (Token id:Id.Lit_Chars val:'\tcp file3.conflict file3 &&\n' span_id:631) (Token id:Id.Lit_Chars val:'\tgit rerere --rerere-autoupdate &&\n' span_id:632) (Token id:Id.Lit_Chars val:'\tgit update-index --refresh &&\n' span_id:633) (Token id:Id.Lit_Chars val:'\n' span_id:634) (Token id:Id.Lit_Chars val:'\tgit rm -fr --cached . &&\n' span_id:635) (Token id: Id.Lit_Chars val: '\tgit update-index --index-info <failedmerge &&\n' span_id: 636 ) (Token id:Id.Lit_Chars val:'\tcp file3.conflict file3 &&\n' span_id:637) (Token id: Id.Lit_Chars val: '\tgit rerere --rerere-autoupdate --no-rerere-autoupdate &&\n' span_id: 638 ) (Token id:Id.Lit_Chars val:'\tgit ls-files -u >actual2 &&\n' span_id:639) (Token id:Id.Lit_Chars val:'\n' span_id:640) (Token id:Id.Lit_Chars val:'\tgit rm -fr --cached . &&\n' span_id:641) (Token id: Id.Lit_Chars val: '\tgit update-index --index-info <failedmerge &&\n' span_id: 642 ) (Token id:Id.Lit_Chars val:'\tcp file3.conflict file3 &&\n' span_id:643) (Token id: Id.Lit_Chars val: '\tgit rerere --rerere-autoupdate --no-rerere-autoupdate --rerere-autoupdate &&\n' span_id: 644 ) (Token id:Id.Lit_Chars val:'\tgit update-index --refresh &&\n' span_id:645) (Token id:Id.Lit_Chars val:'\n' span_id:646) (Token id:Id.Lit_Chars val:'\ttest_cmp expected.unresolved actual1 &&\n' span_id:647) (Token id: Id.Lit_Chars val: '\ttest_cmp expected.unresolved actual2\n' span_id: 648 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'rerere --no-no-rerere-autoupdate' span_id:655))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:659) (Token id:Id.Lit_Chars val:'\tgit rm -fr --cached . &&\n' span_id:660) (Token id:Id.Lit_Chars val:'\tgit update-index --index-info <failedmerge &&\n' span_id:661) (Token id:Id.Lit_Chars val:'\tcp file3.conflict file3 &&\n' span_id:662) (Token id: Id.Lit_Chars val: '\ttest_must_fail git rerere --no-no-rerere-autoupdate 2>err &&\n' span_id: 663 ) (Token id:Id.Lit_Chars val:'\ttest_i18ngrep [Uu]sage err &&\n' span_id:664) (Token id: Id.Lit_Chars val: '\ttest_must_fail git update-index --refresh\n' span_id: 665 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'rerere -h' span_id:672))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:676) (Token id: Id.Lit_Chars val: '\ttest_must_fail git rerere -h >help &&\n' span_id: 677 ) (Token id:Id.Lit_Chars val:'\ttest_i18ngrep [Uu]sage help\n' span_id:678) ) } ) (command.ShFunction name: concat_insert body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:last) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [690] ) ] ) (C {(shift)}) (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp] children: [ (C {(cat)} {(early)}) (C {(printf)} {(DQ ('%s') (Id.Lit_Other '\\') (n))} {(DQ ($ Id.VSub_At '$@'))}) (C {(cat)} {(late)} {(DQ ($ Id.VSub_DollarName '$last'))}) ] ) ] ) ) (command.ShFunction name: count_pre_post body: (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp] children: [ (command.Simple words: [{(find)} {(.git/rr-cache/)} {(-type)} {(f)} {(-name)} {(DQ ('preimage*'))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:750) fd: -1 arg_word: {(actual)} ) ] ) (C {(test_line_count)} {(Id.Lit_Equals '=')} {(DQ ($ Id.VSub_Number '$1'))} {(actual)}) (command.Simple words: [{(find)} {(.git/rr-cache/)} {(-type)} {(f)} {(-name)} {(DQ ('postimage*'))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:783) fd: -1 arg_word: {(actual)} ) ] ) (C {(test_line_count)} {(Id.Lit_Equals '=')} {(DQ ($ Id.VSub_Number '$2'))} {(actual)}) ] ) ] ) ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'rerere gc' span_id:805))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:809) (Token id: Id.Lit_Chars val: '\tfind .git/rr-cache -type f >original &&\n' span_id: 810 ) (Token id:Id.Lit_Chars val:'\txargs test-chmtime -172800 <original &&\n' span_id:811) (Token id:Id.Lit_Chars val:'\n' span_id:812) (Token id: Id.Lit_Chars val: '\tgit -c gc.rerereresolved=5 -c gc.rerereunresolved=5 rerere gc &&\n' span_id: 813 ) (Token id:Id.Lit_Chars val:'\tfind .git/rr-cache -type f >actual &&\n' span_id:814) (Token id:Id.Lit_Chars val:'\ttest_cmp original actual &&\n' span_id:815) (Token id:Id.Lit_Chars val:'\n' span_id:816) (Token id: Id.Lit_Chars val: '\tgit -c gc.rerereresolved=5 -c gc.rerereunresolved=0 rerere gc &&\n' span_id: 817 ) (Token id:Id.Lit_Chars val:'\tfind .git/rr-cache -type f >actual &&\n' span_id:818) (Token id:Id.Lit_Chars val:'\ttest_cmp original actual &&\n' span_id:819) (Token id:Id.Lit_Chars val:'\n' span_id:820) (Token id: Id.Lit_Chars val: '\tgit -c gc.rerereresolved=0 -c gc.rerereunresolved=0 rerere gc &&\n' span_id: 821 ) (Token id:Id.Lit_Chars val:'\tfind .git/rr-cache -type f >actual &&\n' span_id:822) (Token id:Id.Lit_Chars val:'\t>expect &&\n' span_id:823) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:824) ) } ) (command.ShFunction name: merge_conflict_resolve body: (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp] children: [ (C {(git)} {(reset)} {(--hard)}) (C {(test_must_fail)} {(git)} {(merge)} {(six.1)}) (command.Simple words: [{(concat_insert)} {(short)} {(6.1)} {(6.2)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:868) fd: -1 arg_word: {(file1)} ) ] ) (command.Simple words: [{(concat_insert)} {(long)} {(6.1)} {(6.2)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:882) fd: -1 arg_word: {(file2)} ) ] ) ] ) ] ) ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'multiple identical conflicts' span_id:891))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:895) (Token id:Id.Lit_Chars val:'\tgit reset --hard &&\n' span_id:896) (Token id:Id.Lit_Chars val:'\n' span_id:897) (Token id:Id.Lit_Chars val:'\ttest_seq 1 6 >early &&\n' span_id:898) (Token id:Id.Lit_Chars val:'\t>late &&\n' span_id:899) (Token id:Id.Lit_Chars val:'\ttest_seq 11 15 >short &&\n' span_id:900) (Token id:Id.Lit_Chars val:'\ttest_seq 111 120 >long &&\n' span_id:901) (Token id:Id.Lit_Chars val:'\tconcat_insert short >file1 &&\n' span_id:902) (Token id:Id.Lit_Chars val:'\tconcat_insert long >file2 &&\n' span_id:903) (Token id:Id.Lit_Chars val:'\tgit add file1 file2 &&\n' span_id:904) (Token id:Id.Lit_Chars val:'\tgit commit -m base &&\n' span_id:905) (Token id:Id.Lit_Chars val:'\tgit tag base &&\n' span_id:906) (Token id:Id.Lit_Chars val:'\tgit checkout -b six.1 &&\n' span_id:907) (Token id:Id.Lit_Chars val:'\tconcat_insert short 6.1 >file1 &&\n' span_id:908) (Token id:Id.Lit_Chars val:'\tconcat_insert long 6.1 >file2 &&\n' span_id:909) (Token id:Id.Lit_Chars val:'\tgit add file1 file2 &&\n' span_id:910) (Token id:Id.Lit_Chars val:'\tgit commit -m 6.1 &&\n' span_id:911) (Token id:Id.Lit_Chars val:'\tgit checkout -b six.2 HEAD^ &&\n' span_id:912) (Token id:Id.Lit_Chars val:'\tconcat_insert short 6.2 >file1 &&\n' span_id:913) (Token id:Id.Lit_Chars val:'\tconcat_insert long 6.2 >file2 &&\n' span_id:914) (Token id:Id.Lit_Chars val:'\tgit add file1 file2 &&\n' span_id:915) (Token id:Id.Lit_Chars val:'\tgit commit -m 6.2 &&\n' span_id:916) (Token id:Id.Lit_Chars val:'\n' span_id:917) (Token id:Id.Lit_Chars val:'\t# At this point, six.1 and six.2\n' span_id:918) (Token id:Id.Lit_Chars val:'\t# - derive from common ancestor that has two files\n' span_id:919) (Token id: Id.Lit_Chars val: '\t# 1...6 7 11..15 (file1) and 1...6 7 111..120 (file2)\n' span_id: 920 ) (Token id:Id.Lit_Chars val:'\t# - six.1 replaces these 7s with 6.1\n' span_id:921) (Token id: Id.Lit_Chars val: '\t# - six.2 replaces these 7s with 6.2\n' span_id: 922 ) (Token id:Id.Lit_Chars val:'\n' span_id:923) (Token id:Id.Lit_Chars val:'\tmerge_conflict_resolve &&\n' span_id:924) (Token id:Id.Lit_Chars val:'\n' span_id:925) (Token id: Id.Lit_Chars val: '\t# Check that rerere knows that file1 and file2 have conflicts\n' span_id: 926 ) (Token id:Id.Lit_Chars val:'\n' span_id:927) (Token id: Id.Lit_Chars val: '\tprintf "%s\\n" file1 file2 >expect &&\n' span_id: 928 ) (Token id: Id.Lit_Chars val: '\tgit ls-files -u | sed -e "s/^.*\t//" | sort -u >actual &&\n' span_id: 929 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual &&\n' span_id:930) (Token id:Id.Lit_Chars val:'\n' span_id:931) (Token id:Id.Lit_Chars val:'\tgit rerere status | sort >actual &&\n' span_id:932) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual &&\n' span_id:933) (Token id:Id.Lit_Chars val:'\n' span_id:934) (Token id:Id.Lit_Chars val:'\tgit rerere remaining >actual &&\n' span_id:935) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual &&\n' span_id:936) (Token id:Id.Lit_Chars val:'\n' span_id:937) (Token id:Id.Lit_Chars val:'\tcount_pre_post 2 0 &&\n' span_id:938) (Token id:Id.Lit_Chars val:'\n' span_id:939) (Token id: Id.Lit_Chars val: '\t# Pretend that the conflicts were made quite some time ago\n' span_id: 940 ) (Token id: Id.Lit_Chars val: '\tfind .git/rr-cache/ -type f | xargs test-chmtime -172800 &&\n' span_id: 941 ) (Token id:Id.Lit_Chars val:'\n' span_id:942) (Token id: Id.Lit_Chars val: '\t# Unresolved entries have not expired yet\n' span_id: 943 ) (Token id: Id.Lit_Chars val: '\tgit -c gc.rerereresolved=5 -c gc.rerereunresolved=5 rerere gc &&\n' span_id: 944 ) (Token id:Id.Lit_Chars val:'\tcount_pre_post 2 0 &&\n' span_id:945) (Token id:Id.Lit_Chars val:'\n' span_id:946) (Token id:Id.Lit_Chars val:'\t# Unresolved entries have expired\n' span_id:947) (Token id: Id.Lit_Chars val: '\tgit -c gc.rerereresolved=5 -c gc.rerereunresolved=1 rerere gc &&\n' span_id: 948 ) (Token id:Id.Lit_Chars val:'\tcount_pre_post 0 0 &&\n' span_id:949) (Token id:Id.Lit_Chars val:'\n' span_id:950) (Token id:Id.Lit_Chars val:'\t# Recreate the conflicted state\n' span_id:951) (Token id:Id.Lit_Chars val:'\tmerge_conflict_resolve &&\n' span_id:952) (Token id:Id.Lit_Chars val:'\tcount_pre_post 2 0 &&\n' span_id:953) (Token id:Id.Lit_Chars val:'\n' span_id:954) (Token id:Id.Lit_Chars val:'\t# Clear it\n' span_id:955) (Token id:Id.Lit_Chars val:'\tgit rerere clear &&\n' span_id:956) (Token id:Id.Lit_Chars val:'\tcount_pre_post 0 0 &&\n' span_id:957) (Token id:Id.Lit_Chars val:'\n' span_id:958) (Token id:Id.Lit_Chars val:'\t# Recreate the conflicted state\n' span_id:959) (Token id:Id.Lit_Chars val:'\tmerge_conflict_resolve &&\n' span_id:960) (Token id:Id.Lit_Chars val:'\tcount_pre_post 2 0 &&\n' span_id:961) (Token id:Id.Lit_Chars val:'\n' span_id:962) (Token id:Id.Lit_Chars val:'\t# We resolved file1 and file2\n' span_id:963) (Token id:Id.Lit_Chars val:'\tgit rerere &&\n' span_id:964) (Token id:Id.Lit_Chars val:'\t>expect &&\n' span_id:965) (Token id:Id.Lit_Chars val:'\tgit rerere remaining >actual &&\n' span_id:966) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual &&\n' span_id:967) (Token id:Id.Lit_Chars val:'\n' span_id:968) (Token id:Id.Lit_Chars val:'\t# We must have recorded both of them\n' span_id:969) (Token id:Id.Lit_Chars val:'\tcount_pre_post 2 2 &&\n' span_id:970) (Token id:Id.Lit_Chars val:'\n' span_id:971) (Token id: Id.Lit_Chars val: '\t# Now we should be able to resolve them both\n' span_id: 972 ) (Token id:Id.Lit_Chars val:'\tgit reset --hard &&\n' span_id:973) (Token id:Id.Lit_Chars val:'\ttest_must_fail git merge six.1 &&\n' span_id:974) (Token id:Id.Lit_Chars val:'\tgit rerere &&\n' span_id:975) (Token id:Id.Lit_Chars val:'\n' span_id:976) (Token id:Id.Lit_Chars val:'\t>expect &&\n' span_id:977) (Token id:Id.Lit_Chars val:'\tgit rerere remaining >actual &&\n' span_id:978) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual &&\n' span_id:979) (Token id:Id.Lit_Chars val:'\n' span_id:980) (Token id:Id.Lit_Chars val:'\tconcat_insert short 6.1 6.2 >file1.expect &&\n' span_id:981) (Token id: Id.Lit_Chars val: '\tconcat_insert long 6.1 6.2 >file2.expect &&\n' span_id: 982 ) (Token id:Id.Lit_Chars val:'\ttest_cmp file1.expect file1 &&\n' span_id:983) (Token id:Id.Lit_Chars val:'\ttest_cmp file2.expect file2 &&\n' span_id:984) (Token id:Id.Lit_Chars val:'\n' span_id:985) (Token id:Id.Lit_Chars val:'\t# Forget resolution for file2\n' span_id:986) (Token id:Id.Lit_Chars val:'\tgit rerere forget file2 &&\n' span_id:987) (Token id:Id.Lit_Chars val:'\techo file2 >expect &&\n' span_id:988) (Token id:Id.Lit_Chars val:'\tgit rerere status >actual &&\n' span_id:989) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual &&\n' span_id:990) (Token id:Id.Lit_Chars val:'\tcount_pre_post 2 1 &&\n' span_id:991) (Token id:Id.Lit_Chars val:'\n' span_id:992) (Token id: Id.Lit_Chars val: '\t# file2 already has correct resolution, so record it again\n' span_id: 993 ) (Token id:Id.Lit_Chars val:'\tgit rerere &&\n' span_id:994) (Token id:Id.Lit_Chars val:'\n' span_id:995) (Token id:Id.Lit_Chars val:'\t# Pretend that the resolutions are old again\n' span_id:996) (Token id: Id.Lit_Chars val: '\tfind .git/rr-cache/ -type f | xargs test-chmtime -172800 &&\n' span_id: 997 ) (Token id:Id.Lit_Chars val:'\n' span_id:998) (Token id: Id.Lit_Chars val: '\t# Resolved entries have not expired yet\n' span_id: 999 ) (Token id: Id.Lit_Chars val: '\tgit -c gc.rerereresolved=5 -c gc.rerereunresolved=5 rerere gc &&\n' span_id: 1000 ) (Token id:Id.Lit_Chars val:'\n' span_id:1001) (Token id:Id.Lit_Chars val:'\tcount_pre_post 2 2 &&\n' span_id:1002) (Token id:Id.Lit_Chars val:'\n' span_id:1003) (Token id:Id.Lit_Chars val:'\t# Resolved entries have expired\n' span_id:1004) (Token id: Id.Lit_Chars val: '\tgit -c gc.rerereresolved=1 -c gc.rerereunresolved=5 rerere gc &&\n' span_id: 1005 ) (Token id:Id.Lit_Chars val:'\tcount_pre_post 0 0\n' span_id:1006) ) } ) (C {(test_done)}) ] )