(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:OPTIONS_KEEPDASHDASH) op: Equal rhs: {(EmptyPart)} spids: [3] ) ] spids: [3] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:OPTIONS_STUCKLONG) op:Equal rhs:{(EmptyPart)} spids:[5])] spids: [5] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:OPTIONS_SPEC) op: Equal rhs: { (DQ ('git quiltimport [options]\n') ('--\n') ('n,dry-run dry run\n') ('author= author name and email address for patches without any\n') ('patches= path to the quilt patches\n') ('series= path to the quilt series file\n') ) } spids: [7] ) ] spids: [7] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:SUBDIRECTORY_ON) op:Equal rhs:{(Yes)} spids:[18])] spids: [18] ) (C {(.)} {(git-sh-setup)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:dry_run) op:Equal rhs:{(DQ )} spids:[26])] spids: [26] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:quilt_author) op:Equal rhs:{(DQ )} spids:[30])] spids: [30] ) (While cond: [(C {(test)} {($ VSub_Pound '$#')} {(KW_Bang '!') (Lit_Other '=')} {(0)})] body: (DoGroup children: [ (Case to_match: {(DQ ($ VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(--author)}] action: [ (C {(shift)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:quilt_author) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [64] ) ] spids: [64] ) ] spids: [57 58 70 16777215] ) (case_arm pat_list: [{(-n)} {(--dry-run)}] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:dry_run) op:Equal rhs:{(1)} spids:[79])] spids: [79] ) ] spids: [73 76 83 16777215] ) (case_arm pat_list: [{(--patches)}] action: [ (C {(shift)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:QUILT_PATCHES) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [93] ) ] spids: [93] ) ] spids: [86 87 99 16777215] ) (case_arm pat_list: [{(--series)}] action: [ (C {(shift)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:QUILT_SERIES) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [109] ) ] spids: [109] ) ] spids: [102 103 115 16777215] ) (case_arm pat_list: [{(--)}] action: [(C {(shift)}) (ControlFlow token:<ControlFlow_Break break>)] spids: [118 119 126 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [(C {(usage)})] spids: [129 130 136 16777215] ) ] spids: [48 54 139] ) (C {(shift)}) ] spids: [45 144] ) ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_Name '$quilt_author'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DAmp Op_DAmp Op_DAmp Op_DPipe] children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:quilt_author_name) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(DQ (z) ($ VSub_Name '$quilt_author'))} {(Lit_Other ':')} {(SQ <'z\\(.*[^ ]\\) *<.*'>)} ) ] ) left_token: <Left_CommandSub '$('> spids: [168 181] ) } spids: [167] ) ] spids: [167] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:quilt_author_email) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(DQ (z) ($ VSub_Name '$quilt_author'))} {(Lit_Other ':')} {(SQ <'.*<\\([^>]*\\)'>)} ) ] ) left_token: <Left_CommandSub '$('> spids: [187 200] ) } spids: [186] ) ] spids: [186] ) (C {(test)} {(SQ )} {(KW_Bang '!') (Lit_Other '=')} {(DQ ($ VSub_Name '$quilt_author_name'))} ) (C {(test)} {(SQ )} {(KW_Bang '!') (Lit_Other '=')} {(DQ ($ VSub_Name '$quilt_author_email'))} ) (C {(die)} {(DQ ('malformed --author parameter'))}) ] ) ] spids: [16777215 164] ) ] spids: [16777215 241] ) (C {(Lit_Other ':')} { (BracedVarSub token: <VSub_Name QUILT_PATCHES> suffix_op: (StringUnary op_id:VTest_ColonEquals arg_word:{(patches)}) spids: [249 253] ) } ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (C {(Lit_Other '[')} {(-d)} {(DQ ($ VSub_Name '$QUILT_PATCHES'))} {(Lit_Other ']')}) ] negated: T ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} { (DQ ('The ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ($ VSub_Name '$QUILT_PATCHES') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' directory does not exist.') ) } ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 271] ) ] spids: [16777215 289] ) (C {(Lit_Other ':')} { (BracedVarSub token: <VSub_Name QUILT_SERIES> suffix_op: (StringUnary op_id: VTest_ColonEquals arg_word: {($ VSub_Name '$QUILT_PATCHES') (Lit_Slash /) (series)} ) spids: [297 303] ) } ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (C {(Lit_Other '[')} {(-e)} {(DQ ($ VSub_Name '$QUILT_SERIES'))} {(Lit_Other ']')}) ] negated: T ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} { (DQ ('The ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ($ VSub_Name '$QUILT_SERIES') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' file does not exist.') ) } ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 321] ) ] spids: [16777215 339] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tmp_dir) op: Equal rhs: {(DQ ($ VSub_Name '$GIT_DIR')) (/rebase-apply)} spids: [345] ) ] spids: [345] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tmp_msg) op: Equal rhs: {(DQ ($ VSub_Name '$tmp_dir') (/msg))} spids: [351] ) ] spids: [351] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tmp_patch) op: Equal rhs: {(DQ ($ VSub_Name '$tmp_dir') (/patch))} spids: [357] ) ] spids: [357] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tmp_info) op: Equal rhs: {(DQ ($ VSub_Name '$tmp_dir') (/info))} spids: [363] ) ] spids: [363] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:commit) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(git)} {(rev-parse)} {(HEAD)})]) left_token: <Left_CommandSub '$('> spids: [375 381] ) } spids: [374] ) ] spids: [374] ) (AndOr ops: [Op_DPipe] children: [ (C {(mkdir)} {($ VSub_Name '$tmp_dir')}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(2)}) ] ) (While cond: [ (SimpleCommand words: [{(read)} {(patch_name)} {(level)} {(garbage)}] redirects: [(Redir op_id:Redir_LessAnd fd:16777215 arg_word:{(3)} spids:[404])] ) ] body: (DoGroup children: [ (Case to_match: {(DQ ($ VSub_Name '$patch_name'))} arms: [ (case_arm pat_list: [{(SQ )} {(SQ <'#'>) (Lit_Other '*')}] action: [(ControlFlow token:<ControlFlow_Continue continue>)] spids: [16777215 425 428 16777215] ) ] spids: [410 416 430] ) (Case to_match: {(DQ ($ VSub_Name '$level'))} arms: [ (case_arm pat_list: [{(-p) (Lit_Other '*')}] spids: [442 444 446 16777215] ) (case_arm pat_list: [{(SQ )} {(SQ <'#'>) (Lit_Other '*')}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:level) op: Equal rhs: {(EmptyPart)} spids: [459] ) ] spids: [459] ) ] spids: [16777215 456 460 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {(echo)} {(DQ ('unable to parse patch level, ignoring it.'))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:level) op: Equal rhs: {(EmptyPart)} spids: [474] ) ] spids: [474] ) ] spids: [463 464 475 16777215] ) ] spids: [433 439 478] ) (Case to_match: {(DQ ($ VSub_Name '$garbage'))} arms: [ (case_arm pat_list: [{(SQ )} {(SQ <'#'>) (Lit_Other '*')}] spids: [16777215 497 498 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {(echo)} {(DQ ('trailing garbage found in series file: ') ($ VSub_Name '$garbage'))} ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [501 502 516 16777215] ) ] spids: [481 487 519] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (C {(Lit_Other '[')} {(-f)} {(DQ ($ VSub_Name '$QUILT_PATCHES') (/) ($ VSub_Name '$patch_name'))} {(Lit_Other ']')} ) ] negated: T ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {(DQ ($ VSub_Name '$patch_name') (" doesn't exist. Skipping."))}) (ControlFlow token:<ControlFlow_Continue continue>) ] spids: [16777215 540] ) ] spids: [16777215 554] ) (C {(echo)} {($ VSub_Name '$patch_name')}) (AndOr ops: [Op_DPipe] children: [ (SimpleCommand words: [ {(git)} {(mailinfo)} {(DQ ($ VSub_Name '$tmp_msg'))} {(DQ ($ VSub_Name '$tmp_patch'))} ] redirects: [ (Redir op_id: Redir_Less fd: 16777215 arg_word: {(DQ ($ VSub_Name '$QUILT_PATCHES') (/) ($ VSub_Name '$patch_name'))} spids: [576] ) (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ ($ VSub_Name '$tmp_info'))} spids: [583] ) ] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(3)}) ] ) (AndOr ops: [Op_DPipe] children: [ (C {(test)} {(-s)} {(DQ ($ VSub_Name '$tmp_patch'))}) (BraceGroup children: [ (C {(echo)} {(DQ ('Patch is empty. Was it split wrong?'))}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [605] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GIT_AUTHOR_NAME) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(sed)} {(-ne)} {(SQ <'s/Author: //p'>)} {(DQ ($ VSub_Name '$tmp_info'))}) ] ) left_token: <Left_CommandSub '$('> spids: [629 641] ) } spids: [628] ) ] spids: [628] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GIT_AUTHOR_EMAIL) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(sed)} {(-ne)} {(SQ <'s/Email: //p'>)} {(DQ ($ VSub_Name '$tmp_info'))}) ] ) left_token: <Left_CommandSub '$('> spids: [645 657] ) } spids: [644] ) ] spids: [644] ) (C {(export)} {(GIT_AUTHOR_NAME)} {(GIT_AUTHOR_EMAIL)}) (While cond: [ (Sentence child: (AndOr ops: [Op_DAmp] children: [ (C {(test)} {(-z)} {(DQ ($ VSub_Name '$GIT_AUTHOR_EMAIL'))}) (C {(test)} {(-z)} {(DQ ($ VSub_Name '$GIT_AUTHOR_NAME'))}) ] ) terminator: <Op_Semi ';'> ) ] body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_Name '$quilt_author'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GIT_AUTHOR_NAME) op: Equal rhs: {(DQ ($ VSub_Name '$quilt_author_name'))} spids: [709] ) ] spids: [709] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GIT_AUTHOR_EMAIL) op: Equal rhs: {(DQ ($ VSub_Name '$quilt_author_email'))} spids: [716] ) ] spids: [716] ) terminator: <Op_Semi ';'> ) ] spids: [16777215 706] ) (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_Name '$dry_run'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Sentence child: (SimpleCommand words: [ {(echo)} {(DQ ('No author found in ') ($ VSub_Name '$patch_name'))} ] redirects: [ (Redir op_id: Redir_GreatAnd fd: 16777215 arg_word: {(2)} spids: [746] ) ] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GIT_AUTHOR_NAME) op: Equal rhs: {(DQ (dry-run-not-found))} spids: [751] ) ] spids: [751] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GIT_AUTHOR_EMAIL) op: Equal rhs: {(DQ (dry-run-not-found))} spids: [758] ) ] spids: [758] ) terminator: <Op_Semi ';'> ) ] spids: [723 736] ) ] else_action: [ (Sentence child: (SimpleCommand words: [ {(echo)} {(DQ ('No author found in ') ($ VSub_Name '$patch_name'))} ] redirects: [ (Redir op_id: Redir_GreatAnd fd: 16777215 arg_word: {(2)} spids: [775] ) ] ) terminator: <Op_Semi ';'> ) (C {(echo)} {(DQ (---))}) (C {(cat)} {($ VSub_Name '$tmp_msg')}) (Sentence child: (C {(printf)} {(DQ ('Author: '))}) terminator: <Op_Semi ';'> ) (C {(read)} {(patch_author)}) (C {(echo)} {(DQ ($ VSub_Name '$patch_author'))}) (AndOr ops: [Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp] children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:patch_author_name) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(DQ (z) ($ VSub_Name '$patch_author'))} {(Lit_Other ':')} {(SQ <'z\\(.*[^ ]\\) *<.*'>)} ) ] ) left_token: <Left_CommandSub '$('> spids: [815 828] ) } spids: [814] ) ] spids: [814] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:patch_author_email) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(DQ (z) ($ VSub_Name '$patch_author'))} {(Lit_Other ':')} {(SQ <'.*<\\([^>]*\\)'>)} ) ] ) left_token: <Left_CommandSub '$('> spids: [834 847] ) } spids: [833] ) ] spids: [833] ) (C {(test)} {(SQ )} {(KW_Bang '!') (Lit_Other '=')} {(DQ ($ VSub_Name '$patch_author_name'))} ) (C {(test)} {(SQ )} {(KW_Bang '!') (Lit_Other '=')} {(DQ ($ VSub_Name '$patch_author_email'))} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GIT_AUTHOR_NAME) op: Equal rhs: {(DQ ($ VSub_Name '$patch_author_name'))} spids: [882] ) ] spids: [882] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GIT_AUTHOR_EMAIL) op: Equal rhs: {(DQ ($ VSub_Name '$patch_author_email'))} spids: [890] ) ] spids: [890] ) ] ) ] spids: [765 896] ) ] spids: [689 899] ) ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GIT_AUTHOR_DATE) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(sed)} {(-ne)} {(SQ <'s/Date: //p'>)} {(DQ ($ VSub_Name '$tmp_info'))}) ] ) left_token: <Left_CommandSub '$('> spids: [903 915] ) } spids: [902] ) ] spids: [902] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SUBJECT) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(sed)} {(-ne)} {(SQ <'s/Subject: //p'>)} {(DQ ($ VSub_Name '$tmp_info'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [919 931] ) } spids: [918] ) ] spids: [918] ) (C {(export)} {(GIT_AUTHOR_DATE)} {(SUBJECT)}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$SUBJECT'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SUBJECT) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {($ VSub_Name '$patch_name')}) (C {(sed)} {(-e)} {(SQ <'s/.patch$//'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [959 973] ) } spids: [958] ) ] spids: [958] ) ] spids: [16777215 955] ) ] spids: [16777215 976] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$dry_run'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DAmp Op_DAmp Op_DAmp Op_DPipe] children: [ (C {(git)} {(apply)} {(--index)} {(-C1)} { (BracedVarSub token: <VSub_Name level> suffix_op: (StringUnary op_id: VTest_ColonPlus arg_word: {(DQ ($ VSub_Name '$level'))} ) spids: [1005 1011] ) } {(DQ ($ VSub_Name '$tmp_patch'))} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tree) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(git)} {(write-tree)})]) left_token: <Left_CommandSub '$('> spids: [1021 1025] ) } spids: [1020] ) ] spids: [1020] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:commit) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (Subshell child: (CommandList children: [ (Sentence child: (C {(echo)} {(DQ ($ VSub_Name '$SUBJECT'))}) terminator: <Op_Semi ';'> ) (Sentence child: (C {(echo)}) terminator: <Op_Semi ';'> ) (C {(cat)} {(DQ ($ VSub_Name '$tmp_msg'))}) ] ) spids: [1033 1049] ) (C {(git)} {(commit-tree)} {($ VSub_Name '$tree')} {(-p)} {($ VSub_Name '$commit')} ) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [1031 1062] ) } spids: [1030] ) ] spids: [1030] ) (C {(git)} {(update-ref)} {(-m)} {(DQ ('quiltimport: ') ($ VSub_Name '$patch_name'))} {(HEAD)} {($ VSub_Name '$commit')} ) (ControlFlow token: <ControlFlow_Exit exit> arg_word: {(4)} ) ] ) ] spids: [16777215 994] ) ] spids: [16777215 1089] ) ] spids: [407 1091] ) redirects: [ (Redir op_id: Redir_Less fd: 3 arg_word: {(DQ ($ VSub_Name '$QUILT_SERIES'))} spids: [1093] ) ] ) (AndOr ops: [Op_DPipe] children: [ (C {(rm)} {(-rf)} {($ VSub_Name '$tmp_dir')}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(5)}) ] ) ] )