(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:test_description spids:[21]) op: Equal rhs: {(SQ <'Test built-in diff output engine.\n'> <'\n'>)} spids: [21] ) ] spids: [21] ) (C {(.)} {(./test-lib.sh)}) (C {(.)} {(DQ ($ VSub_Name '$TEST_DIRECTORY')) (/diff-lib.sh)}) (command.SimpleCommand words: [{(echo)} {(SQ <'Line 1\n'> <'Line 2\n'> <'line 3'>)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(path0)})] ) (command.SimpleCommand words: [{(cat)} {(path0)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(path1)})] ) (C {(chmod)} {(Lit_Other '+') (x)} {(path1)}) (C {(test_expect_success)} {(SQ <'update-index --add two files with and without +x.'>)} {(SQ <'\n'> <'\tgit update-index --add path0 path1\n'>)} ) (C {(mv)} {(path0)} {(path0-)}) (command.SimpleCommand words: [{(sed)} {(-e)} {(SQ <s/line/Line/>)}] redirects: [ (redir.Redir op:<Redir_Less '<'> fd:16777215 arg_word:{(path0-)}) (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(path0)}) ] ) (C {(chmod)} {(Lit_Other '+') (x)} {(path0)}) (C {(rm)} {(-f)} {(path1)}) (C {(test_expect_success)} {(SQ <'git diff-files -p after editing work tree.'>)} {(SQ <'\n'> <'\tgit diff-files -p >actual\n'>)} ) (command.If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(config)} {(--get)} {(core.filemode)})] ) left_token: <Left_CommandSub '$('> spids: [130 138] ) ) } {(Lit_Other '=')} {(false)} {(Lit_Other ']')} ) ] action: [(C {(say)} {(SQ <'filemode disabled on the filesystem'>)}) (C {(test_done)})] spids: [16777215 147] ) ] spids: [16777215 159] ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expected)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)} here_end_span_id: 189 stdin_parts: [ ('diff --git a/path0 b/path0\n') ('old mode 100644\n') ('new mode 100755\n') ('--- a/path0\n') ('+++ b/path0\n') ('@@ -1,3 +1,3 @@\n') (' Line 1\n') (' Line 2\n') ('-line 3\n') ('+Line 3\n') ('diff --git a/path1 b/path1\n') ('deleted file mode 100755\n') ('--- a/path1\n') ('+++ /dev/null\n') ('@@ -1,3 +0,0 @@\n') ('-Line 1\n') ('-Line 2\n') ('-line 3\n') ] ) ] ) (C {(test_expect_success)} {(SQ <'validate git diff-files -p output.'>)} {(SQ <'\n'> <'\tcompare_diff_patch expected actual\n'>)} ) (C {(test_expect_success)} {(SQ <'git diff-files -s after editing work tree'>)} { (SQ <'\n'> <'\tgit diff-files -s >actual 2>err &&\n'> <'\ttest_must_be_empty actual &&\n'> <'\ttest_must_be_empty err\n'> ) } ) (C {(test_expect_success)} {(SQ <'git diff-files --no-patch as synonym for -s'>)} { (SQ <'\n'> <'\tgit diff-files --no-patch >actual 2>err &&\n'> <'\ttest_must_be_empty actual &&\n'> <'\ttest_must_be_empty err\n'> ) } ) (C {(test_expect_success)} {(SQ <'git diff-files --no-patch --patch shows the patch'>)} { (SQ <'\n'> <'\tgit diff-files --no-patch --patch >actual &&\n'> <'\tcompare_diff_patch expected actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'git diff-files --no-patch --patch-with-raw shows the patch and raw data'>)} { (SQ <'\n'> <'\tgit diff-files --no-patch --patch-with-raw >actual &&\n'> < '\tgrep -q "^:100644 100755 .* 0000000000000000000000000000000000000000 M\tpath0\\$" actual &&\n' > <'\ttail -n +4 actual >actual-patch &&\n'> <'\tcompare_diff_patch expected actual-patch\n'> ) } ) (C {(test_expect_success)} {(SQ <'git diff-files --patch --no-patch does not show the patch'>)} { (SQ <'\n'> <'\tgit diff-files --patch --no-patch >actual 2>err &&\n'> <'\ttest_must_be_empty actual &&\n'> <'\ttest_must_be_empty err\n'> ) } ) (C {(test_done)}) ] )