(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <"utf-8 decomposed (nfd) converted to precomposed (nfc)">)} spids: [13] ) ] spids: [13] ) (C {(.)} {(./test-lib.sh)}) (If arms: [ (if_arm cond: [(Pipeline children:[(C {(test_have_prereq)} {(UTF8_NFD_TO_NFC)})] negated:True)] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:skip_all) op: Equal rhs: {(DQ ("filesystem does not corrupt utf-8"))} spids: [35] ) ] spids: [35] ) (C {(test_done)}) ] spids: [-1 32] ) ] spids: [-1 43] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:Adiarnfc) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(printf)} {(SQ <"\\303\\204">)})]) left_token: <Left_CommandSub "$("> spids: [50 56] ) } spids: [49] ) ] spids: [49] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:Adiarnfd) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(printf)} {(SQ <"A\\314\\210">)})]) left_token: <Left_CommandSub "$("> spids: [59 65] ) } spids: [58] ) ] spids: [58] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:Odiarnfc) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(printf)} {(SQ <"\\303\\226">)})]) left_token: <Left_CommandSub "$("> spids: [69 75] ) } spids: [68] ) ] spids: [68] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:Odiarnfd) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(printf)} {(SQ <"O\\314\\210">)})]) left_token: <Left_CommandSub "$("> spids: [78 84] ) } spids: [77] ) ] spids: [77] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:AEligatu) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(printf)} {(SQ <"\\303\\206">)})]) left_token: <Left_CommandSub "$("> spids: [87 93] ) } spids: [86] ) ] spids: [86] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:Invalidu) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(printf)} {(SQ <"\\303\\377">)})]) left_token: <Left_CommandSub "$("> spids: [96 102] ) } spids: [95] ) ] spids: [95] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:Alongd) op: Equal rhs: {($ VSub_Name "$Adiarnfd") ($ VSub_Name "$Adiarnfd") ($ VSub_Name "$Adiarnfd") ($ VSub_Name "$Adiarnfd") ($ VSub_Name "$Adiarnfd") ($ VSub_Name "$Adiarnfd") ($ VSub_Name "$Adiarnfd") } spids: [109] ) ] spids: [109] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:Alongd) op: Equal rhs: {($ VSub_Name "$Alongd") ($ VSub_Name "$Alongd") ($ VSub_Name "$Alongd")} spids: [121] ) ] spids: [121] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:Alongd) op: Equal rhs: {($ VSub_Name "$Alongd") ($ VSub_Name "$Alongd") ($ VSub_Name "$Alongd") ($ VSub_Name "$Alongd") ($ VSub_Name "$Adiarnfd") } spids: [129] ) ] spids: [129] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:Alongc) op: Equal rhs: {($ VSub_Name "$AEligatu") ($ VSub_Name "$AEligatu") ($ VSub_Name "$AEligatu") ($ VSub_Name "$AEligatu") ($ VSub_Name "$AEligatu") } spids: [143] ) ] spids: [143] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:Alongc) op: Equal rhs: {($ VSub_Name "$Alongc") ($ VSub_Name "$Alongc") ($ VSub_Name "$Alongc") ($ VSub_Name "$Alongc") ($ VSub_Name "$Alongc") } spids: [153] ) ] spids: [153] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:Alongc) op: Equal rhs: {($ VSub_Name "$Alongc") ($ VSub_Name "$Alongc") ($ VSub_Name "$Alongc") ($ VSub_Name "$Alongc") ($ VSub_Name "$Alongc") } spids: [163] ) ] spids: [163] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:Alongc) op: Equal rhs: {($ VSub_Name "$Alongc") ($ VSub_Name "$AEligatu") ($ VSub_Name "$AEligatu")} spids: [173] ) ] spids: [173] ) (C {(test_expect_success)} {(DQ ("detect if nfd needed"))} { (SQ <"\n"> <"\tprecomposeunicode=$(git config core.precomposeunicode) &&\n"> <"\ttest \"$precomposeunicode\" = true &&\n"> <"\tgit config core.precomposeunicode true\n"> ) } ) (C {(test_expect_success)} {(DQ (setup))} { (SQ <"\n"> <"\t>x &&\n"> <"\tgit add x &&\n"> <"\tgit commit -m \"1st commit\" &&\n"> <"\tgit rm x &&\n"> <"\tgit commit -m \"rm x\"\n"> ) } ) (C {(test_expect_success)} {(DQ ("setup case mac"))} {(SQ <"\n"> <"\tgit checkout -b mac_os\n">)}) (C {(test_expect_success)} {(DQ ("git diff f.Adiar"))} { (SQ <"\n"> <"\ttouch f.$Adiarnfc &&\n"> <"\tgit add f.$Adiarnfc &&\n"> <"\techo f.Adiarnfc >f.$Adiarnfc &&\n"> <"\tgit diff f.$Adiarnfd >expect &&\n"> <"\tgit diff f.$Adiarnfc >actual &&\n"> <"\ttest_cmp expect actual &&\n"> <"\tgit reset HEAD f.Adiarnfc &&\n"> <"\trm f.$Adiarnfc expect actual\n"> ) } ) (C {(test_expect_success)} {(DQ ("git diff-files f.Adiar"))} { (SQ <"\n"> <"\ttouch f.$Adiarnfc &&\n"> <"\tgit add f.$Adiarnfc &&\n"> <"\techo f.Adiarnfc >f.$Adiarnfc &&\n"> <"\tgit diff-files f.$Adiarnfd >expect &&\n"> <"\tgit diff-files f.$Adiarnfc >actual &&\n"> <"\ttest_cmp expect actual &&\n"> <"\tgit reset HEAD f.Adiarnfc &&\n"> <"\trm f.$Adiarnfc expect actual\n"> ) } ) (C {(test_expect_success)} {(DQ ("git diff-index f.Adiar"))} { (SQ <"\n"> <"\ttouch f.$Adiarnfc &&\n"> <"\tgit add f.$Adiarnfc &&\n"> <"\techo f.Adiarnfc >f.$Adiarnfc &&\n"> <"\tgit diff-index HEAD f.$Adiarnfd >expect &&\n"> <"\tgit diff-index HEAD f.$Adiarnfc >actual &&\n"> <"\ttest_cmp expect actual &&\n"> <"\tgit reset HEAD f.Adiarnfc &&\n"> <"\trm f.$Adiarnfc expect actual\n"> ) } ) (C {(test_expect_success)} {(DQ ("add file Adiarnfc"))} { (SQ <"\n"> <"\techo f.Adiarnfc >f.$Adiarnfc &&\n"> <"\tgit add f.$Adiarnfc &&\n"> <"\tgit commit -m \"add f.$Adiarnfc\"\n"> ) } ) (C {(test_expect_success)} {(DQ ("git diff-tree f.Adiar"))} { (SQ <"\n"> <"\techo f.Adiarnfc >>f.$Adiarnfc &&\n"> <"\tgit diff-tree HEAD f.$Adiarnfd >expect &&\n"> <"\tgit diff-tree HEAD f.$Adiarnfc >actual &&\n"> <"\ttest_cmp expect actual &&\n"> <"\tgit checkout f.$Adiarnfc &&\n"> <"\trm expect actual\n"> ) } ) (C {(test_expect_success)} {(DQ ("stage file d.Adiarnfd/f.Adiarnfd"))} { (SQ <"\n"> <"\tmkdir d.$Adiarnfd &&\n"> <"\techo d.$Adiarnfd/f.$Adiarnfd >d.$Adiarnfd/f.$Adiarnfd &&\n"> <"\tgit stage d.$Adiarnfd/f.$Adiarnfd &&\n"> <"\tgit commit -m \"add d.$Adiarnfd/f.$Adiarnfd\"\n"> ) } ) (C {(test_expect_success)} {(DQ ("add link Adiarnfc"))} { (SQ <"\n"> <"\tln -s d.$Adiarnfd/f.$Adiarnfd l.$Adiarnfc &&\n"> <"\tgit add l.$Adiarnfc &&\n"> <"\tgit commit -m \"add l.Adiarnfc\"\n"> ) } ) (C {(test_expect_success)} {(DQ ("git log f.Adiar"))} { (SQ <"\n"> <"\tgit log f.$Adiarnfc > f.Adiarnfc.log &&\n"> <"\tgit log f.$Adiarnfd > f.Adiarnfd.log &&\n"> <"\ttest -s f.Adiarnfc.log &&\n"> <"\ttest -s f.Adiarnfd.log &&\n"> <"\ttest_cmp f.Adiarnfc.log f.Adiarnfd.log &&\n"> <"\trm f.Adiarnfc.log f.Adiarnfd.log\n"> ) } ) (C {(test_expect_success)} {(DQ ("git lsfiles f.Adiar"))} { (SQ <"\n"> <"\tgit ls-files f.$Adiarnfc > f.Adiarnfc.log &&\n"> <"\tgit ls-files f.$Adiarnfd > f.Adiarnfd.log &&\n"> <"\ttest -s f.Adiarnfc.log &&\n"> <"\ttest -s f.Adiarnfd.log &&\n"> <"\ttest_cmp f.Adiarnfc.log f.Adiarnfd.log &&\n"> <"\trm f.Adiarnfc.log f.Adiarnfd.log\n"> ) } ) (C {(test_expect_success)} {(DQ ("git mv"))} { (SQ <"\n"> <"\tgit mv f.$Adiarnfd f.$Odiarnfc &&\n"> <"\tgit mv d.$Adiarnfd d.$Odiarnfc &&\n"> <"\tgit mv l.$Adiarnfd l.$Odiarnfc &&\n"> <"\tgit commit -m \"mv Adiarnfd Odiarnfc\"\n"> ) } ) (C {(test_expect_success)} {(DQ ("git checkout nfc"))} {(SQ <"\n"> <"\trm f.$Odiarnfc &&\n"> <"\tgit checkout f.$Odiarnfc\n">)} ) (C {(test_expect_success)} {(DQ ("git checkout file nfd"))} {(SQ <"\n"> <"\trm -f f.* &&\n"> <"\tgit checkout f.$Odiarnfd\n">)} ) (C {(test_expect_success)} {(DQ ("git checkout link nfd"))} {(SQ <"\n"> <"\trm l.* &&\n"> <"\tgit checkout l.$Odiarnfd\n">)} ) (C {(test_expect_success)} {(DQ ("setup case mac2"))} { (SQ <"\n"> <"\tgit checkout master &&\n"> <"\tgit reset --hard &&\n"> <"\tgit checkout -b mac_os_2\n"> ) } ) (C {(test_expect_success)} {(DQ ("commit file d2.Adiarnfd/f.Adiarnfd"))} { (SQ <"\n"> <"\tmkdir d2.$Adiarnfd &&\n"> <"\techo d2.$Adiarnfd/f.$Adiarnfd >d2.$Adiarnfd/f.$Adiarnfd &&\n"> <"\tgit add d2.$Adiarnfd/f.$Adiarnfd &&\n"> <"\tgit commit -m \"add d2.$Adiarnfd/f.$Adiarnfd\" -- d2.$Adiarnfd/f.$Adiarnfd\n"> ) } ) (C {(test_expect_success)} {(DQ ("setup for long decomposed filename"))} { (SQ <"\n"> <"\tgit checkout master &&\n"> <"\tgit reset --hard &&\n"> <"\tgit checkout -b mac_os_long_nfd_fn\n"> ) } ) (C {(test_expect_success)} {(DQ ("Add long decomposed filename"))} { (SQ <"\n"> <"\techo longd >$Alongd &&\n"> <"\tgit add * &&\n"> <"\tgit commit -m \"Long filename\"\n"> ) } ) (C {(test_expect_success)} {(DQ ("setup for long precomposed filename"))} { (SQ <"\n"> <"\tgit checkout master &&\n"> <"\tgit reset --hard &&\n"> <"\tgit checkout -b mac_os_long_nfc_fn\n"> ) } ) (C {(test_expect_success)} {(DQ ("Add long precomposed filename"))} { (SQ <"\n"> <"\techo longc >$Alongc &&\n"> <"\tgit add * &&\n"> <"\tgit commit -m \"Long filename\"\n"> ) } ) (C {(test_expect_failure)} {(SQ <"handle existing decomposed filenames">)} { (SQ <"\n"> <"\techo content >\"verbatim.$Adiarnfd\" &&\n"> <"\tgit -c core.precomposeunicode=false add \"verbatim.$Adiarnfd\" &&\n"> <"\tgit commit -m \"existing decomposed file\" &&\n"> <"\t>expect &&\n"> <"\tgit ls-files --exclude-standard -o \"verbatim*\" >untracked &&\n"> <"\ttest_cmp expect untracked\n"> ) } ) (C {(test_expect_success)} {(DQ ("respect git config --global core.precomposeunicode"))} { (SQ <"\n"> <"\tgit config --global core.precomposeunicode true &&\n"> <"\trm -rf .git &&\n"> <"\tgit init &&\n"> <"\tprecomposeunicode=$(git config core.precomposeunicode) &&\n"> <"\ttest \"$precomposeunicode\" = \"true\"\n"> ) } ) (C {(test_done)}) ] )