(command.CommandList children: [ (C {(Lit_Other ':')} {(Included)} {(from)} {(t1000-read-tree-m-3way.sh)} {(and)} {(others)}) (C {(mkdir)} {(Z)}) (command.ForEach iter_name: a iter_words: [{(N)} {(D)} {(M)}] do_arg_iter: F body: (command.DoGroup children: [ (command.ForEach iter_name: b iter_words: [{(N)} {(D)} {(M)}] do_arg_iter: F body: (command.DoGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:p) op: Equal rhs: {($ VSub_DollarName '$a') ($ VSub_DollarName '$b')} ) ] ) (command.SimpleCommand words: [ {(echo)} {(This)} {(is)} {($ VSub_DollarName '$p')} {(from)} {(the)} {(original)} {(tree.)} ] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {($ VSub_DollarName '$p')} ) ] ) (command.SimpleCommand words: [ {(echo)} {(This)} {(is)} {(Z/) ($ VSub_DollarName '$p')} {(from)} {(the)} {(original)} {(tree.)} ] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(Z/) ($ VSub_DollarName '$p')} ) ] ) (C {(test_expect_success)} { (DQ ('adding test file ') ($ VSub_DollarName '$p') (' and Z/') ($ VSub_DollarName '$p') ) } {(SQ <'git update-index --add $p &&\n'> <'\t git update-index --add Z/$p'>)} ) ] ) ) ] ) ) (command.SimpleCommand words: [{(echo)} {(This)} {(is)} {(SS)} {(from)} {(the)} {(original)} {(tree.)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(SS)})] ) (C {(test_expect_success)} {(SQ <'adding test file SS'>)} {(SQ <'git update-index --add SS'>)}) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(TT)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)} here_end_span_id: 172 stdin_parts: [ ('This is a trivial merge sample text.\n') ('Branch A is expected to upcase this word, here.\n') ('There are some filler lines to avoid diff context\n') ('conflicts here,\n') ('like this one,\n') ('and this one,\n') ('and this one is yet another one of them.\n') ('At the very end, here comes another line, that is\n') ('the word, expected to be upcased by Branch B.\n') ('This concludes the trivial merge sample file.\n') ] ) ] ) (C {(test_expect_success)} {(SQ <'adding test file TT'>)} {(SQ <'git update-index --add TT'>)}) (C {(test_expect_success)} {(SQ <'prepare initial tree'>)} {(SQ <'tree_O=$(git write-tree)'>)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:to_remove) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(echo)} {(D) (Lit_Other '?')} {(Z/D) (Lit_Other '?')})] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (C {(rm)} {(-f)} {($ VSub_DollarName '$to_remove')}) (C {(test_expect_success)} {(SQ <'change in branch A (removal)'>)} {(SQ <'git update-index --remove $to_remove'>)} ) (command.ForEach iter_name: p iter_words: [{(M) (Lit_Other '?')} {(Z/M) (Lit_Other '?')}] do_arg_iter: F body: (command.DoGroup children: [ (command.SimpleCommand words: [ {(echo)} {(This)} {(is)} {(modified)} {($ VSub_DollarName '$p')} {(KW_In in)} {(the)} {(branch)} {(A.)} ] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {($ VSub_DollarName '$p')} ) ] ) (C {(test_expect_success)} {(SQ <'change in branch A (modification)'>)} {(DQ ('git update-index ') ($ VSub_DollarName '$p'))} ) ] ) ) (command.ForEach iter_name: p iter_words: [{(AN)} {(AA)} {(Z/AN)} {(Z/AA)}] do_arg_iter: F body: (command.DoGroup children: [ (command.SimpleCommand words: [ {(echo)} {(This)} {(is)} {(added)} {($ VSub_DollarName '$p')} {(KW_In in)} {(the)} {(branch)} {(A.)} ] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {($ VSub_DollarName '$p')} ) ] ) (C {(test_expect_success)} {(SQ <'change in branch A (addition)'>)} {(DQ ('git update-index --add ') ($ VSub_DollarName '$p'))} ) ] ) ) (command.SimpleCommand words: [{(echo)} {(This)} {(is)} {(SS)} {(from)} {(the)} {(modified)} {(tree.)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(SS)})] ) (command.SimpleCommand words: [{(echo)} {(This)} {(is)} {(LL)} {(from)} {(the)} {(modified)} {(tree.)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(LL)})] ) (C {(test_expect_success)} {(SQ <'change in branch A (addition)'>)} {(SQ <'git update-index --add LL &&\n'> <' git update-index SS'>)} ) (C {(mv)} {(TT)} {(TT-)}) (command.SimpleCommand words: [{(sed)} {(-e)} {(SQ <'/Branch A/s/word/WORD/g'>)}] redirects: [ (redir.Redir op:<Redir_Less '<'> fd:16777215 arg_word:{(TT-)}) (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(TT)}) ] ) (C {(rm)} {(-f)} {(TT-)}) (C {(test_expect_success)} {(SQ <'change in branch A (edit)'>)} {(SQ <'git update-index TT'>)}) (C {(mkdir)} {(DF)}) (command.SimpleCommand words: [ {(echo)} {(Branch)} {(A)} {(makes)} {(a)} {(file)} {(at)} {(DF/DF) (Lit_Comma ',')} {(creating)} {(a)} {(directory)} {(DF.)} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(DF/DF)})] ) (C {(test_expect_success)} {(SQ <'change in branch A (change file to directory)'>)} {(SQ <'git update-index --add DF/DF'>)} ) (C {(test_expect_success)} {(SQ <'recording branch A tree'>)} {(SQ <'tree_A=$(git write-tree)'>)}) (C {(rm)} {(-rf)} {(Lit_Other '[') (NDMASLT) (Lit_Other ']') (Lit_Other '[') (NDMASLT) (Lit_Other ']')} {(Z)} {(DF)} ) (C {(mkdir)} {(Z)}) (C {(test_expect_success)} {(SQ <'reading original tree and checking out'>)} {(SQ <'git read-tree $tree_O &&\n'> <' git checkout-index -a'>)} ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:to_remove) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(echo)} {(Lit_Other '?') (D)} {(Z/) (Lit_Other '?') (D)})] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (C {(rm)} {(-f)} {($ VSub_DollarName '$to_remove')}) (C {(test_expect_success)} {(SQ <'change in branch B (removal)'>)} {(DQ ('git update-index --remove ') ($ VSub_DollarName '$to_remove'))} ) (command.ForEach iter_name: p iter_words: [{(Lit_Other '?') (M)} {(Z/) (Lit_Other '?') (M)}] do_arg_iter: F body: (command.DoGroup children: [ (command.SimpleCommand words: [ {(echo)} {(This)} {(is)} {(modified)} {($ VSub_DollarName '$p')} {(KW_In in)} {(the)} {(branch)} {(B.)} ] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {($ VSub_DollarName '$p')} ) ] ) (C {(test_expect_success)} {(SQ <'change in branch B (modification)'>)} {(DQ ('git update-index ') ($ VSub_DollarName '$p'))} ) ] ) ) (command.ForEach iter_name: p iter_words: [{(NA)} {(AA)} {(Z/NA)} {(Z/AA)}] do_arg_iter: F body: (command.DoGroup children: [ (command.SimpleCommand words: [ {(echo)} {(This)} {(is)} {(added)} {($ VSub_DollarName '$p')} {(KW_In in)} {(the)} {(branch)} {(B.)} ] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {($ VSub_DollarName '$p')} ) ] ) (C {(test_expect_success)} {(SQ <'change in branch B (addition)'>)} {(DQ ('git update-index --add ') ($ VSub_DollarName '$p'))} ) ] ) ) (command.SimpleCommand words: [{(echo)} {(This)} {(is)} {(SS)} {(from)} {(the)} {(modified)} {(tree.)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(SS)})] ) (command.SimpleCommand words: [{(echo)} {(This)} {(is)} {(LL)} {(from)} {(the)} {(modified)} {(tree.)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(LL)})] ) (C {(test_expect_success)} {(SQ <'change in branch B (addition and modification)'>)} {(SQ <'git update-index --add LL &&\n'> <' git update-index SS'>)} ) (C {(mv)} {(TT)} {(TT-)}) (command.SimpleCommand words: [{(sed)} {(-e)} {(SQ <'/Branch B/s/word/WORD/g'>)}] redirects: [ (redir.Redir op:<Redir_Less '<'> fd:16777215 arg_word:{(TT-)}) (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(TT)}) ] ) (C {(rm)} {(-f)} {(TT-)}) (C {(test_expect_success)} {(SQ <'change in branch B (modification)'>)} {(SQ <'git update-index TT'>)} ) (command.SimpleCommand words: [{(echo)} {(Branch)} {(B)} {(makes)} {(a)} {(file)} {(at)} {(DF.)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(DF)})] ) (C {(test_expect_success)} {(SQ <'change in branch B (addition of a file to conflict with directory)'>)} {(SQ <'git update-index --add DF'>)} ) (C {(test_expect_success)} {(SQ <'recording branch B tree'>)} {(SQ <'tree_B=$(git write-tree)'>)}) (C {(test_expect_success)} {(SQ <'keep contents of 3 trees for easy access'>)} { (SQ <'rm -f .git/index &&\n'> <' git read-tree $tree_O &&\n'> <' mkdir .orig-O &&\n'> <' git checkout-index --prefix=.orig-O/ -f -q -a &&\n'> <' rm -f .git/index &&\n'> <' git read-tree $tree_A &&\n'> <' mkdir .orig-A &&\n'> <' git checkout-index --prefix=.orig-A/ -f -q -a &&\n'> <' rm -f .git/index &&\n'> <' git read-tree $tree_B &&\n'> <' mkdir .orig-B &&\n'> <' git checkout-index --prefix=.orig-B/ -f -q -a'> ) } ) ] )