(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <'diff order'>)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (FuncDef name: create_files body: (BraceGroup children: [ (AndOr ops: [Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp] children: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Number '$1'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(a.h)} spids:[29])] ) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Number '$1'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(b.c)} spids:[41])] ) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Number '$1'))}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(c/Makefile)} spids: [53] ) ] ) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Number '$1'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(d.txt)} spids:[65])] ) (C {(git)} {(add)} {(a.h)} {(b.c)} {(c/Makefile)} {(d.txt)}) (C {(git)} {(commit)} {(-m) (DQ ($ VSub_Number '$1'))}) ] ) ] spids: [20] ) spids: [15 19] ) (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'> ) } ) (ForEach iter_name: i iter_words: [{(1)} {(2)}] do_arg_iter: F body: (DoGroup children: [ (C {(test_expect_success)} {(DQ ('orderfile using option (') ($ VSub_Name '$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_Name '$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_Name '$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_Name '$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'> ) } ) ] spids: [213 290] ) spids: [208 16777215] ) (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'> ) } ) (ForEach iter_name: i iter_words: [{(1)} {(2)}] do_arg_iter: F body: (DoGroup children: [ (C {(test_expect_success)} {(DQ ('combine-diff: orderfile using option (') ($ VSub_Name '$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'> ) } ) ] spids: [332 350] ) spids: [327 16777215] ) (C {(test_done)}) ] )