(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:test_description)
          op: Equal
          rhs: {(SQ <'diff order'>)}
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (command.FuncDef
      name: create_files
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp]
              children: [
                (command.SimpleCommand
                  words: [{(echo)} {(DQ ($ VSub_Number '$1'))}]
                  redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(a.h)})]
                )
                (command.SimpleCommand
                  words: [{(echo)} {(DQ ($ VSub_Number '$1'))}]
                  redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(b.c)})]
                )
                (command.SimpleCommand
                  words: [{(echo)} {(DQ ($ VSub_Number '$1'))}]
                  redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(c/Makefile)})]
                )
                (command.SimpleCommand
                  words: [{(echo)} {(DQ ($ VSub_Number '$1'))}]
                  redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(d.txt)})]
                )
                (C {(git)} {(add)} {(a.h)} {(b.c)} {(c/Makefile)} {(d.txt)})
                (C {(git)} {(commit)} {(-m) (DQ ($ VSub_Number '$1'))})
              ]
            )
          ]
        )
    )
    (C {(test_expect_success)} {(SQ <setup>)} 
      {
        (SQ <'\n'> <'\tmkdir c &&\n'> <'\tcreate_files 1 &&\n'> <'\tcreate_files 2 &&\n'> <'\n'> 
          <'\tcat >order_file_1 <<-\\EOF &&\n'> <'\t*Makefile\n'> <'\t*.txt\n'> <'\t*.h\n'> <'\tEOF\n'> <'\n'> <'\tcat >order_file_2 <<-\\EOF &&\n'> 
          <'\t*Makefile\n'> <'\t*.h\n'> <'\t*.c\n'> <'\tEOF\n'> <'\n'> <'\tcat >expect_none <<-\\EOF &&\n'> <'\ta.h\n'> <'\tb.c\n'> 
          <'\tc/Makefile\n'> <'\td.txt\n'> <'\tEOF\n'> <'\n'> <'\tcat >expect_1 <<-\\EOF &&\n'> <'\tc/Makefile\n'> <'\td.txt\n'> 
          <'\ta.h\n'> <'\tb.c\n'> <'\tEOF\n'> <'\n'> <'\tcat >expect_2 <<-\\EOF\n'> <'\tc/Makefile\n'> <'\ta.h\n'> <'\tb.c\n'> 
          <'\td.txt\n'> <'\tEOF\n'>
        )
      }
    )
    (C {(test_expect_success)} {(DQ ('no order (=tree object order)'))} 
      {
        (SQ <'\n'> <'\tgit diff --name-only HEAD^..HEAD >actual &&\n'> 
          <'\ttest_cmp expect_none actual\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'missing orderfile'>)} 
      {
        (SQ <'\n'> <'\trm -f bogus_file &&\n'> 
          <'\ttest_must_fail git diff -Obogus_file --name-only HEAD^..HEAD\n'>
        )
      }
    )
    (C {(test_expect_success)} {(POSIXPERM) (Lit_Comma ',') (SANITY)} {(SQ <'unreadable orderfile'>)} 
      {
        (SQ <'\n'> <'\t>unreadable_file &&\n'> <'\tchmod -r unreadable_file &&\n'> 
          <'\ttest_must_fail git diff -Ounreadable_file --name-only HEAD^..HEAD\n'>
        )
      }
    )
    (C {(test_expect_success)} {(DQ ('orderfile using option from subdir with --output'))} 
      {
        (SQ <'\n'> <'\tmkdir subdir &&\n'> 
          <'\tgit -C subdir diff -O../order_file_1 --output ../actual --name-only HEAD^..HEAD &&\n'> <'\ttest_cmp expect_1 actual\n'>
        )
      }
    )
    (command.ForEach
      iter_name: i
      iter_words: [{(1)} {(2)}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (C {(test_expect_success)} 
              {(DQ ('orderfile using option (') ($ VSub_DollarName '$i') (')'))} 
              {
                (SQ <'\n'> <'\t\tgit diff -Oorder_file_$i --name-only HEAD^..HEAD >actual &&\n'> 
                  <'\t\ttest_cmp expect_$i actual\n'> <'\t'>
                )
              }
            )
            (C {(test_expect_success)} {(PIPE)} 
              {(DQ ('orderfile is fifo (') ($ VSub_DollarName '$i') (')'))} 
              {
                (SQ <'\n'> <'\t\trm -f order_fifo &&\n'> <'\t\tmkfifo order_fifo &&\n'> <'\t\t{\n'> 
                  <'\t\t\tcat order_file_$i >order_fifo &\n'> <'\t\t} &&\n'> <'\t\tgit diff -O order_fifo --name-only HEAD^..HEAD >actual &&\n'> <'\t\twait &&\n'> 
                  <'\t\ttest_cmp expect_$i actual\n'> <'\t'>
                )
              }
            )
            (C {(test_expect_success)} 
              {(DQ ('orderfile using config (') ($ VSub_DollarName '$i') (')'))} 
              {
                (SQ <'\n'> 
                  <
'\t\tgit -c diff.orderfile=order_file_$i diff --name-only HEAD^..HEAD >actual &&\n'
                  > <'\t\ttest_cmp expect_$i actual\n'> <'\t'>
                )
              }
            )
            (C {(test_expect_success)} 
              {(DQ ('cancelling configured orderfile (') ($ VSub_DollarName '$i') (')'))} 
              {
                (SQ <'\n'> 
                  <
'\t\tgit -c diff.orderfile=order_file_$i diff -O/dev/null --name-only HEAD^..HEAD >actual &&\n'
                  > <'\t\ttest_cmp expect_none actual\n'> <'\t'>
                )
              }
            )
          ]
        )
    )
    (C {(test_expect_success)} {(SQ <'setup for testing combine-diff order'>)} 
      {
        (SQ <'\n'> <'\tgit checkout -b tmp HEAD~ &&\n'> <'\tcreate_files 3 &&\n'> 
          <'\tgit checkout master &&\n'> <'\tgit merge --no-commit -s ours tmp &&\n'> <'\tcreate_files 5\n'>
        )
      }
    )
    (C {(test_expect_success)} {(DQ ('combine-diff: no order (=tree object order)'))} 
      {
        (SQ <'\n'> <'\tgit diff --name-only HEAD HEAD^ HEAD^2 >actual &&\n'> 
          <'\ttest_cmp expect_none actual\n'>
        )
      }
    )
    (command.ForEach
      iter_name: i
      iter_words: [{(1)} {(2)}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (C {(test_expect_success)} 
              {(DQ ('combine-diff: orderfile using option (') ($ VSub_DollarName '$i') (')'))} 
              {
                (SQ <'\n'> <'\t\tgit diff -Oorder_file_$i --name-only HEAD HEAD^ HEAD^2 >actual &&\n'> 
                  <'\t\ttest_cmp expect_$i actual\n'> <'\t'>
                )
              }
            )
          ]
        )
    )
    (C {(test_done)})
  ]
)