(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:test_description)
          op: Equal
          rhs: {(SQ <"git-apply --ignore-whitespace.\n"> <"\n">)}
          spids: [13]
        )
      ]
      spids: [13]
    )
    (C {(.)} {(./test-lib.sh)})
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(patch1.patch)} spids:[33])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: 
            {("diff --git a/main.c b/main.c\n") ("new file mode 100644\n") ("--- /dev/null\n") 
              ("+++ b/main.c\n") ("@@ -0,0 +1,22 @@\n") ("+#include <stdio.h>\n") ("+\n") ("+void print_int(int num);\n") 
              ("+int func(int num);\n") ("+\n") ("+int main() {\n") ("+       int i;\n") ("+\n") ("+       for (i = 0; i < 10; i++) {\n") 
              ("+               print_int(func(i)); /* stuff */\n") ("+       }\n") ("+\n") ("+       return 0;\n") ("+}\n") ("+\n") ("+int func(int num) {\n") 
              ("+       return num * num;\n") ("+}\n") ("+\n") ("+void print_int(int num) {\n") ("+       printf(\"%d\", num);\n") ("+}\n")
            }
          do_expansion: False
          here_end: EOF
          was_filled: True
          spids: [37]
        )
      ]
    )
    (SimpleCommand
      words: [{(sed)} {(-e)} {(SQ <"s/Z/ /g">)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(patch2.patch)} spids:[67])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: 
            {("diff --git a/main.c b/main.c\n") ("--- a/main.c\n") ("+++ b/main.c\n") 
              ("@@ -10,6 +10,8 @@\n") ("Z\t\tprint_int(func(i)); /* stuff */\n") ("Z\t}\n") ("Z\n") ("+\tprintf(\"\\n\");\n") ("+\n") 
              ("Z\treturn 0;\n") ("Z}\n") ("Z\n")
            }
          do_expansion: False
          here_end: EOF
          was_filled: True
          spids: [71]
        )
      ]
    )
    (SimpleCommand
      words: [{(sed)} {(-e)} {(SQ <"s/Z/ /g">)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(patch3.patch)} spids:[97])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: 
            {("diff --git a/main.c b/main.c\n") ("--- a/main.c\n") ("+++ b/main.c\n") 
              ("@@ -10,3 +10,4 @@\n") ("Z\tfor (i = 0; i < 10; i++) {\n") ("Z\t\tprint_int(func(i));Z\n") ("+\t\t/* stuff */\n") ("Z\t}\n")
            }
          do_expansion: False
          here_end: EOF
          was_filled: True
          spids: [101]
        )
      ]
    )
    (SimpleCommand
      words: [{(sed)} {(-e)} {(SQ <"s/Z/ /g">)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(patch4.patch)} spids:[121])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: 
            {("diff --git a/main.c b/main.c\n") ("--- a/main.c\n") ("+++ b/main.c\n") 
              ("@@ -21,1 +21,1 @@\n") ("-\t};Z\n") ("\\ No newline at end of file\n") ("+\t};\n")
            }
          do_expansion: False
          here_end: EOF
          was_filled: True
          spids: [125]
        )
      ]
    )
    (SimpleCommand
      words: [{(sed)} {(-e)} {(SQ <"s/Z/ /g">)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(patch5.patch)} spids:[142])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: 
            {("diff --git a/main.c b/main.c\n") ("--- a/main.c\n") ("+++ b/main.c\n") 
              ("@@ -2,2 +2,3 @@\n") ("Z\tvoid print_int(int num);\n") ("+\t/* a comment */\n") ("Z\tint func(int num);\n")
            }
          do_expansion: False
          here_end: EOF
          was_filled: True
          spids: [146]
        )
      ]
    )
    (SimpleCommand
      words: [{(sed)} {(-e)} {(SQ <"s/T/\t/g">)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(main.c.final)} spids:[166])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: 
            {("#include <stdio.h>\n") ("\n") ("void print_int(int num);\n") ("int func(int num);\n") 
              ("\n") ("int main() {\n") ("       int i;\n") ("\n") ("       for (i = 0; i < 10; i++) {\n") 
              ("               print_int(func(i)); /* stuff */\n") ("       }\n") ("\n") ("Tprintf(\"\\n\");\n") ("\n") ("       return 0;\n") ("}\n") ("\n") 
              ("int func(int num) {\n") ("       return num * num;\n") ("}\n") ("\n") ("void print_int(int num) {\n") 
              ("       printf(\"%d\", num);\n") ("}\n")
            }
          do_expansion: False
          here_end: EOF
          was_filled: True
          spids: [170]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <"file creation">)} {(SQ <"\n"> <"\tgit apply patch1.patch\n">)})
    (C {(test_expect_success)} {(SQ <"patch2 fails (retab)">)} 
      {(SQ <"\n"> <"\ttest_must_fail git apply patch2.patch\n">)}
    )
    (C {(test_expect_success)} {(SQ <"patch2 applies with --ignore-whitespace">)} 
      {(SQ <"\n"> <"\tgit apply --ignore-whitespace patch2.patch\n">)}
    )
    (C {(test_expect_success)} {(SQ <"patch2 reverse applies with --ignore-space-change">)} 
      {(SQ <"\n"> <"\tgit apply -R --ignore-space-change patch2.patch\n">)}
    )
    (C {(git)} {(config)} {(apply.ignorewhitespace)} {(change)})
    (C {(test_expect_success)} {(SQ <"patch2 applies (apply.ignorewhitespace = change)">)} 
      {(SQ <"\n"> <"\tgit apply patch2.patch &&\n"> <"\ttest_cmp main.c.final main.c\n">)}
    )
    (C {(test_expect_success)} {(SQ <"patch3 fails (missing string at EOL)">)} 
      {(SQ <"\n"> <"\ttest_must_fail git apply patch3.patch\n">)}
    )
    (C {(test_expect_success)} {(SQ <"patch4 fails (missing EOL at EOF)">)} 
      {(SQ <"\n"> <"\ttest_must_fail git apply patch4.patch\n">)}
    )
    (C {(test_expect_success)} {(SQ <"patch5 fails (leading whitespace differences matter)">)} 
      {(SQ <"\n"> <"\ttest_must_fail git apply patch5.patch\n">)}
    )
    (C {(test_expect_success)} {(SQ <"re-create file (with --ignore-whitespace)">)} 
      {(SQ <"\n"> <"\trm -f main.c &&\n"> <"\tgit apply patch1.patch\n">)}
    )
    (C {(test_expect_success)} {(SQ <"patch5 fails (--no-ignore-whitespace)">)} 
      {(SQ <"\n"> <"\ttest_must_fail git apply --no-ignore-whitespace patch5.patch\n">)}
    )
    (C {(test_done)})
  ]
)