(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:test_description spids:[12]) op: Equal rhs: {(SQ <'read-tree D/F conflict corner cases'>)} spids: [12] ) ] spids: [12] ) (C {(.)} {(./test-lib.sh)}) (C {(.)} {(DQ ($ VSub_Name '$TEST_DIRECTORY')) (/lib-read-tree.sh)}) (command.FuncDef name: maketree body: (command.BraceGroup children: [ (command.Subshell child: (command.AndOr ops: [Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp] children: [ (C {(rm)} {(-f)} {(.git/index)} {(.git/index.lock)}) (C {(git)} {(clean)} {(-d)} {(-f)} {(-f)} {(-q)} {(-x)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:name spids:[69]) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [69] ) ] spids: [69] ) (C {(shift)}) (command.ForEach iter_name: it do_arg_iter: T body: (command.DoGroup children: [ (command.AndOr ops: [Op_DAmp Op_DAmp Op_DAmp Op_DPipe] children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:path spids:[90]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(expr)} {(DQ ($ VSub_Name '$it'))} {(Lit_Other ':')} {(SQ <'\\([^:]*\\)'>)} ) ] ) left_token: <Left_CommandSub '$('> spids: [91 103] ) } spids: [90] ) ] spids: [90] ) (C {(mkdir)} {(-p)} { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(dirname)} {(DQ ($ VSub_Name '$path'))})] ) left_token: <Left_CommandSub '$('> spids: [112 118] ) } ) (command.SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$it'))}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(DQ ($ VSub_Name '$path'))} ) ] ) (C {(git)} {(update-index)} {(--add)} {(DQ ($ VSub_Name '$path'))}) (command.ControlFlow token: <ControlFlow_Exit exit> ) ] ) ] spids: [87 152] ) spids: [16777215 16777215] ) (C {(git)} {(tag)} {(DQ ($ VSub_Name '$name'))} { (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(git)} {(write-tree)})]) left_token: <Left_CommandSub '$('> spids: [165 169] ) } ) ] ) spids: [38 172] ) ] spids: [35] ) spids: [30 34] ) (command.FuncDef name: settree body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DAmp Op_DAmp Op_DAmp Op_DAmp] children: [ (C {(rm)} {(-f)} {(.git/index)} {(.git/index.lock)}) (C {(git)} {(clean)} {(-d)} {(-f)} {(-f)} {(-q)} {(-x)}) (C {(git)} {(read-tree)} {(DQ ($ VSub_Number '$1'))}) (C {(git)} {(checkout-index)} {(-f)} {(-q)} {(-u)} {(-a)}) (C {(git)} {(update-index)} {(--refresh)}) ] ) ] spids: [182] ) spids: [177 181] ) (command.FuncDef name: checkindex body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (command.Pipeline children: [ (C {(git)} {(ls-files)} {(-s)}) (command.SimpleCommand words: [ {(sed)} { (DQ ('s|^[0-7][0-7]* ') ($ VSub_Name '$_x40') (' ') (Lit_Other '\\') ('([0-3]') (Lit_Other '\\') (')\t|') (Lit_Other '\\') ('1 |') ) } ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(current)})] ) ] negated: F ) (command.SimpleCommand words: [{(cat)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (C {(test_cmp)} {(expect)} {(current)}) ] ) ] spids: [253] ) spids: [248 252] ) (C {(test_expect_success)} {(setup)} { (SQ <'\n'> <'\tmaketree O-000 a/b-2/c/d a/b/c/d a/x &&\n'> <'\tmaketree A-000 a/b-2/c/d a/b/c/d a/x &&\n'> <'\tmaketree A-001 a/b-2/c/d a/b/c/d a/b/c/e a/x &&\n'> <'\tmaketree B-000 a/b-2/c/d a/b a/x &&\n'> <'\n'> <'\tmaketree O-010 t-0 t/1 t/2 t=3 &&\n'> <'\tmaketree A-010 t-0 t t=3 &&\n'> <'\tmaketree B-010 t/1: t=3: &&\n'> <'\n'> <'\tmaketree O-020 ds/dma/ioat.c ds/dma/ioat_dca.c &&\n'> <'\tmaketree A-020 ds/dma/ioat/Makefile ds/dma/ioat/registers.h &&\n'> <'\t:\n'> ) } ) (C {(test_expect_success)} {(SQ <'3-way (1)'>)} { (SQ <'\n'> <'\tsettree A-000 &&\n'> <'\tread_tree_u_must_succeed -m -u O-000 A-000 B-000 &&\n'> <'\tcheckindex <<-EOF\n'> <'\t3 a/b\n'> <'\t0 a/b-2/c/d\n'> <'\t1 a/b/c/d\n'> <'\t2 a/b/c/d\n'> <'\t0 a/x\n'> <'\tEOF\n'> ) } ) (C {(test_expect_success)} {(SQ <'3-way (2)'>)} { (SQ <'\n'> <'\tsettree A-001 &&\n'> <'\tread_tree_u_must_succeed -m -u O-000 A-001 B-000 &&\n'> <'\tcheckindex <<-EOF\n'> <'\t3 a/b\n'> <'\t0 a/b-2/c/d\n'> <'\t1 a/b/c/d\n'> <'\t2 a/b/c/d\n'> <'\t2 a/b/c/e\n'> <'\t0 a/x\n'> <'\tEOF\n'> ) } ) (C {(test_expect_success)} {(SQ <'3-way (3)'>)} { (SQ <'\n'> <'\tsettree A-010 &&\n'> <'\tread_tree_u_must_succeed -m -u O-010 A-010 B-010 &&\n'> <'\tcheckindex <<-EOF\n'> <'\t2 t\n'> <'\t1 t-0\n'> <'\t2 t-0\n'> <'\t1 t/1\n'> <'\t3 t/1\n'> <'\t1 t/2\n'> <'\t0 t=3\n'> <'\tEOF\n'> ) } ) (C {(test_expect_success)} {(SQ <'2-way (1)'>)} { (SQ <'\n'> <'\tsettree O-020 &&\n'> <'\tread_tree_u_must_succeed -m -u O-020 A-020 &&\n'> <'\tcheckindex <<-EOF\n'> <'\t0 ds/dma/ioat/Makefile\n'> <'\t0 ds/dma/ioat/registers.h\n'> <'\tEOF\n'> ) } ) (C {(test_done)}) ] )