(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:test_description)
          op: Equal
          rhs: {(SQ <'commit and log output encodings'>)}
          spids: [13]
        )
      ]
      spids: [13]
    )
    (C {(.)} {(./test-lib.sh)})
    (FuncDef
      name: compare_with
      body: 
        (BraceGroup
          children: [
            (AndOr
              children: [
                (Pipeline
                  children: [
                    (C {(git)} {(show)} {(-s)} {($ VSub_Number '$1')})
                    (SimpleCommand
                      words: [{(sed)} {(-e)} {(SQ <'1,/^$/d'>)} {(-e)} {(SQ <'s/^    //'>)}]
                      redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(current)} spids:[56])]
                    )
                  ]
                  negated: False
                )
                (Case
                  to_match: {(DQ ($ VSub_Number '$3'))}
                  arms: [
                    (case_arm
                      pat_list: [{(SQ )}]
                      action: [(C {(test_cmp)} {(DQ ($ VSub_Number '$2'))} {(current)})]
                      spids: [-1 73 84 -1]
                    )
                    (case_arm
                      pat_list: [{(Lit_Other '?') (Lit_Other '*')}]
                      action: [
                        (AndOr
                          children: [
                            (SimpleCommand
                              words: [{(iconv)} {(-f)} {(DQ ($ VSub_Number '$3'))} {(-t)} {(UTF-8)}]
                              redirects: [
                                (Redir
                                  op_id: Redir_Great
                                  fd: -1
                                  arg_word: {(current.utf8)}
                                  spids: [104]
                                )
                                (Redir
                                  op_id: Redir_Less
                                  fd: -1
                                  arg_word: {(current)}
                                  spids: [107]
                                )
                              ]
                            )
                            (AndOr
                              children: [
                                (SimpleCommand
                                  words: [{(iconv)} {(-f)} {(DQ ($ VSub_Number '$3'))} {(-t)} {(UTF-8)}]
                                  redirects: [
                                    (Redir
                                      op_id: Redir_Great
                                      fd: -1
                                      arg_word: {(expect.utf8)}
                                      spids: [125]
                                    )
                                    (Redir
                                      op_id: Redir_Less
                                      fd: -1
                                      arg_word: {(DQ ($ VSub_Number '$2'))}
                                      spids: [128]
                                    )
                                  ]
                                )
                                (C {(test_cmp)} {(expect.utf8)} {(current.utf8)})
                              ]
                              op_id: Op_DAmp
                            )
                          ]
                          op_id: Op_DAmp
                        )
                      ]
                      spids: [87 89 143 -1]
                    )
                  ]
                  spids: [62 68 146]
                )
              ]
              op_id: Op_DAmp
            )
          ]
          spids: [29]
        )
      spids: [24 28]
    )
    (C {(test_expect_success)} {(setup)} 
      {
        (SQ <'\n'> <'\t: >F &&\n'> <'\tgit add F &&\n'> <'\tT=$(git write-tree) &&\n'> 
          <'\tC=$(git commit-tree $T <"$TEST_DIRECTORY"/t3900/1-UTF-8.txt) &&\n'> <'\tgit update-ref HEAD $C &&\n'> <'\tgit tag C0\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'no encoding header for base case'>)} 
      {
        (SQ <'\n'> <'\tE=$(git cat-file commit C0 | sed -ne "s/^encoding //p") &&\n'> 
          <'\ttest z = "z$E"\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'UTF-16 refused because of NULs'>)} 
      {
        (SQ <'\n'> <'\techo UTF-16 >F &&\n'> 
          <'\ttest_must_fail git commit -a -F "$TEST_DIRECTORY"/t3900/UTF-16.txt\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'UTF-8 invalid characters refused'>)} 
      {
        (SQ <'\n'> <'\ttest_when_finished "rm -f $HOME/stderr $HOME/invalid" &&\n'> 
          <'\techo "UTF-8 characters" >F &&\n'> <'\tprintf "Commit message\\n\\nInvalid surrogate:\\355\\240\\200\\n" \\\n'> 
          <'\t\t>"$HOME/invalid" &&\n'> <'\tgit commit -a -F "$HOME/invalid" 2>"$HOME"/stderr &&\n'> 
          <'\ttest_i18ngrep "did not conform" "$HOME"/stderr\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'UTF-8 overlong sequences rejected'>)} 
      {
        (SQ <'\n'> <'\ttest_when_finished "rm -f $HOME/stderr $HOME/invalid" &&\n'> 
          <'\trm -f "$HOME/stderr" "$HOME/invalid" &&\n'> <'\techo "UTF-8 overlong" >F &&\n'> 
          <'\tprintf "\\340\\202\\251ommit message\\n\\nThis is not a space:\\300\\240\\n" \\\n'> <'\t\t>"$HOME/invalid" &&\n'> <'\tgit commit -a -F "$HOME/invalid" 2>"$HOME"/stderr &&\n'> 
          <'\ttest_i18ngrep "did not conform" "$HOME"/stderr\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'UTF-8 non-characters refused'>)} 
      {
        (SQ <'\n'> <'\ttest_when_finished "rm -f $HOME/stderr $HOME/invalid" &&\n'> 
          <'\techo "UTF-8 non-character 1" >F &&\n'> <'\tprintf "Commit message\\n\\nNon-character:\\364\\217\\277\\276\\n" \\\n'> 
          <'\t\t>"$HOME/invalid" &&\n'> <'\tgit commit -a -F "$HOME/invalid" 2>"$HOME"/stderr &&\n'> 
          <'\ttest_i18ngrep "did not conform" "$HOME"/stderr\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'UTF-8 non-characters refused'>)} 
      {
        (SQ <'\n'> <'\ttest_when_finished "rm -f $HOME/stderr $HOME/invalid" &&\n'> 
          <'\techo "UTF-8 non-character 2." >F &&\n'> <'\tprintf "Commit message\\n\\nNon-character:\\357\\267\\220\\n" \\\n'> <'\t\t>"$HOME/invalid" &&\n'> 
          <'\tgit commit -a -F "$HOME/invalid" 2>"$HOME"/stderr &&\n'> <'\ttest_i18ngrep "did not conform" "$HOME"/stderr\n'>
        )
      }
    )
    (ForEach
      iter_name: H
      iter_words: [{(ISO8859-1)} {(eucJP)} {(ISO-2022-JP)}]
      do_arg_iter: False
      body: 
        (DoGroup
          children: [
            (C {(test_expect_success)} {(DQ ($ VSub_Name '$H') (' setup'))} 
              {
                (SQ <'\n'> <'\t\tgit config i18n.commitencoding $H &&\n'> 
                  <'\t\tgit checkout -b $H C0 &&\n'> <'\t\techo $H >F &&\n'> <'\t\tgit commit -a -F "$TEST_DIRECTORY"/t3900/$H.txt\n'> <'\t'>
                )
              }
            )
          ]
          spids: [273 292]
        )
      spids: [266 -1]
    )
    (ForEach
      iter_name: H
      iter_words: [{(ISO8859-1)} {(eucJP)} {(ISO-2022-JP)}]
      do_arg_iter: False
      body: 
        (DoGroup
          children: [
            (C {(test_expect_success)} {(DQ ('check encoding header for ') ($ VSub_Name '$H'))} 
              {(SQ <'\n'> <'\t\tE=$(git cat-file commit '>) ($ VSub_Name '$H') 
                (SQ <' | sed -ne "s/^encoding //p") &&\n'> <'\t\ttest "z$E" = "z'>) ($ VSub_Name '$H') (SQ <'"\n'> <'\t'>)
              }
            )
          ]
          spids: [307 332]
        )
      spids: [300 -1]
    )
    (C {(test_expect_success)} {(SQ <'config to remove customization'>)} 
      {
        (SQ <'\n'> <'\tgit config --unset-all i18n.commitencoding &&\n'> 
          <'\tif Z=$(git config --get-all i18n.commitencoding)\n'> <'\tthen\n'> <'\t\techo Oops, should have failed.\n'> <'\t\tfalse\n'> <'\telse\n'> 
          <'\t\ttest z = "z$Z"\n'> <'\tfi &&\n'> <'\tgit config i18n.commitencoding UTF-8\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'ISO8859-1 should be shown in UTF-8 now'>)} 
      {(SQ <'\n'> <'\tcompare_with ISO8859-1 "$TEST_DIRECTORY"/t3900/1-UTF-8.txt\n'>)}
    )
    (ForEach
      iter_name: H
      iter_words: [{(eucJP)} {(ISO-2022-JP)}]
      do_arg_iter: False
      body: 
        (DoGroup
          children: [
            (C {(test_expect_success)} {(DQ ($ VSub_Name '$H') (' should be shown in UTF-8 now'))} 
              {(SQ <'\n'> <'\t\tcompare_with '>) ($ VSub_Name '$H') 
                (SQ <' "$TEST_DIRECTORY"/t3900/2-UTF-8.txt\n'> <'\t'>)
              }
            )
          ]
          spids: [377 397]
        )
      spids: [372 -1]
    )
    (C {(test_expect_success)} {(SQ <'config to add customization'>)} 
      {
        (SQ <'\n'> <'\tgit config --unset-all i18n.commitencoding &&\n'> 
          <'\tif Z=$(git config --get-all i18n.commitencoding)\n'> <'\tthen\n'> <'\t\techo Oops, should have failed.\n'> <'\t\tfalse\n'> <'\telse\n'> 
          <'\t\ttest z = "z$Z"\n'> <'\tfi\n'>
        )
      }
    )
    (ForEach
      iter_name: H
      iter_words: [{(ISO8859-1)} {(eucJP)} {(ISO-2022-JP)}]
      do_arg_iter: False
      body: 
        (DoGroup
          children: [
            (C {(test_expect_success)} {(DQ ($ VSub_Name '$H') (' should be shown in itself now'))} 
              {(SQ <'\n'> <'\t\tgit config i18n.commitencoding '>) ($ VSub_Name '$H') 
                (SQ <' &&\n'> <'\t\tcompare_with '>) ($ VSub_Name '$H') (SQ <' "$TEST_DIRECTORY"/t3900/'>) ($ VSub_Name '$H') (SQ <'.txt\n'> <'\t'>)
              }
            )
          ]
          spids: [431 460]
        )
      spids: [424 -1]
    )
    (C {(test_expect_success)} {(SQ <'config to tweak customization'>)} 
      {(SQ <'\n'> <'\tgit config i18n.logoutputencoding UTF-8\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'ISO8859-1 should be shown in UTF-8 now'>)} 
      {(SQ <'\n'> <'\tcompare_with ISO8859-1 "$TEST_DIRECTORY"/t3900/1-UTF-8.txt\n'>)}
    )
    (ForEach
      iter_name: H
      iter_words: [{(eucJP)} {(ISO-2022-JP)}]
      do_arg_iter: False
      body: 
        (DoGroup
          children: [
            (C {(test_expect_success)} {(DQ ($ VSub_Name '$H') (' should be shown in UTF-8 now'))} 
              {(SQ <'\n'> <'\t\tcompare_with '>) ($ VSub_Name '$H') 
                (SQ <' "$TEST_DIRECTORY"/t3900/2-UTF-8.txt\n'> <'\t'>)
              }
            )
          ]
          spids: [497 517]
        )
      spids: [492 -1]
    )
    (ForEach
      iter_name: J
      iter_words: [{(eucJP)} {(ISO-2022-JP)}]
      do_arg_iter: False
      body: 
        (DoGroup
          children: [
            (If
              arms: [
                (if_arm
                  cond: [(C {(test)} {(DQ ($ VSub_Name '$J'))} {(Lit_Other '=')} {(ISO-2022-JP)})]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:ICONV)
                          op: Equal
                          rhs: {($ VSub_Name '$J')}
                          spids: [549]
                        )
                      ]
                      spids: [549]
                    )
                  ]
                  spids: [-1 546]
                )
              ]
              else_action: [
                (Assignment
                  keyword: Assign_None
                  pairs: [(assign_pair lhs:(LhsName name:ICONV) op:Equal rhs:{(SQ )} spids:[556])]
                  spids: [556]
                )
              ]
              spids: [553 559]
            )
            (C {(git)} {(config)} {(i18n.logoutputencoding)} {($ VSub_Name '$J')})
            (ForEach
              iter_name: H
              iter_words: [{(eucJP)} {(ISO-2022-JP)}]
              do_arg_iter: False
              body: 
                (DoGroup
                  children: [
                    (C {(test_expect_success)} 
                      {(DQ ($ VSub_Name '$H') (' should be shown in ') ($ VSub_Name '$J') (' now'))} 
                      {(SQ <'\n'> <'\t\t\tcompare_with '>) ($ VSub_Name '$H') 
                        (SQ <' "$TEST_DIRECTORY"/t3900/'>) ($ VSub_Name '$J') (SQ <'.txt $ICONV\n'> <'\t\t'>)
                      }
                    )
                  ]
                  spids: [582 609]
                )
              spids: [576 -1]
            )
          ]
          spids: [530 611]
        )
      spids: [525 -1]
    )
    (ForEach
      iter_name: H
      iter_words: [{(ISO8859-1)} {(eucJP)} {(ISO-2022-JP)}]
      do_arg_iter: False
      body: 
        (DoGroup
          children: [
            (C {(test_expect_success)} {(DQ ('No conversion with ') ($ VSub_Name '$H'))} 
              {(SQ <'\n'> <'\t\tcompare_with "--encoding=none '>) ($ VSub_Name '$H') 
                (SQ <'" "$TEST_DIRECTORY"/t3900/'>) ($ VSub_Name '$H') (SQ <'.txt\n'> <'\t'>)
              }
            )
          ]
          spids: [626 650]
        )
      spids: [619 -1]
    )
    (FuncDef
      name: test_commit_autosquash_flags
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:H)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [661]
                )
              ]
              spids: [661]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:flag)
                  op: Equal
                  rhs: {($ VSub_Number '$2')}
                  spids: [665]
                )
              ]
              spids: [665]
            )
            (C {(test_expect_success)} 
              {(DQ ('commit --') ($ VSub_Name '$flag') (' with ') ($ VSub_Name '$H') (' encoding'))} 
              {
                (SQ <'\n'> <'\t\tgit config i18n.commitencoding $H &&\n'> 
                  <'\t\tgit checkout -b $H-$flag C0 &&\n'> <'\t\techo $H >>F &&\n'> <'\t\tgit commit -a -F "$TEST_DIRECTORY"/t3900/$H.txt &&\n'> 
                  <'\t\ttest_tick &&\n'> <'\t\techo intermediate stuff >>G &&\n'> <'\t\tgit add G &&\n'> 
                  <'\t\tgit commit -a -m "intermediate commit" &&\n'> <'\t\ttest_tick &&\n'> <'\t\techo $H $flag >>F &&\n'> <'\t\tgit commit -a --$flag HEAD~1 &&\n'> 
                  <'\t\tE=$(git cat-file commit '>
                ) ($ VSub_Name '$H') (-) ($ VSub_Name '$flag') 
                (SQ <' |\n'> <'\t\t\tsed -ne "s/^encoding //p") &&\n'> <'\t\ttest "z$E" = "z$H" &&\n'> 
                  <'\t\tgit config --unset-all i18n.commitencoding &&\n'> <'\t\tgit rebase --autosquash -i HEAD^^^ &&\n'> <'\t\tgit log --oneline >actual &&\n'> 
                  <'\t\ttest_line_count = 3 actual\n'> <'\t'>
                )
              }
            )
          ]
          spids: [658]
        )
      spids: [653 657]
    )
    (C {(test_commit_autosquash_flags)} {(eucJP)} {(fixup)})
    (C {(test_commit_autosquash_flags)} {(ISO-2022-JP)} {(squash)})
    (C {(test_done)})
  ]
)