(CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:OPTIONS_KEEPDASHDASH) op:Equal rhs:{(SQ )} spids:[3])] spids: [3] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:OPTIONS_STUCKLONG) op:Equal rhs:{(SQ )} 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 -1] ) (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 -1] ) (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 -1] ) (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 -1] ) (case_arm pat_list: [{(--)}] action: [(C {(shift)}) (ControlFlow token:<ControlFlow_Break break>)] spids: [118 119 126 -1] ) (case_arm pat_list: [{(Lit_Other "*")}] action: [(C {(usage)})] spids: [129 130 136 -1] ) ] 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 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] ) (AndOr children: [ (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] ) (AndOr children: [ (C {(test)} {(SQ )} {(KW_Bang "!") (Lit_Other "=")} {(DQ ($ VSub_Name "$quilt_author_name"))} ) (AndOr children: [ (C {(test)} {(SQ )} {(KW_Bang "!") (Lit_Other "=")} {(DQ ($ VSub_Name "$quilt_author_email"))} ) (C {(die)} {(DQ ("malformed --author parameter"))}) ] op_id: Op_DPipe ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] spids: [-1 164] ) ] spids: [-1 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: True ) terminator: <Op_Semi ";"> ) ] action: [ (C {(echo)} { (DQ ("The ") (EscapedLiteralPart token:<Lit_EscapedChar "\\\"">) ($ VSub_Name "$QUILT_PATCHES") (EscapedLiteralPart token:<Lit_EscapedChar "\\\"">) (" directory does not exist.") ) } ) (C {(exit)} {(1)}) ] spids: [-1 271] ) ] spids: [-1 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: True ) terminator: <Op_Semi ";"> ) ] action: [ (C {(echo)} { (DQ ("The ") (EscapedLiteralPart token:<Lit_EscapedChar "\\\"">) ($ VSub_Name "$QUILT_SERIES") (EscapedLiteralPart token:<Lit_EscapedChar "\\\"">) (" file does not exist.") ) } ) (C {(exit)} {(1)}) ] spids: [-1 321] ) ] spids: [-1 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 children:[(C {(mkdir)} {($ VSub_Name "$tmp_dir")})(C {(exit)} {(2)})] op_id:Op_DPipe) (While cond: [ (SimpleCommand words: [{(read)} {(patch_name)} {(level)} {(garbage)}] redirects: [(Redir op_id:Redir_LessAnd fd:-1 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: [-1 425 428 -1] ) ] spids: [410 416 430] ) (Case to_match: {(DQ ($ VSub_Name "$level"))} arms: [ (case_arm pat_list:[{(-p) (Lit_Other "*")}] spids:[442444446-1]) (case_arm pat_list: [{(SQ )} {(SQ <"#">) (Lit_Other "*")}] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:level) op:Equal rhs:{(SQ )} spids:[459])] spids: [459] ) ] spids: [-1 456 460 -1] ) (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:{(SQ )} spids:[474])] spids: [474] ) ] spids: [463 464 475 -1] ) ] spids: [433 439 478] ) (Case to_match: {(DQ ($ VSub_Name "$garbage"))} arms: [ (case_arm pat_list: [{(SQ )} {(SQ <"#">) (Lit_Other "*")}] spids: [-1 497 498 -1] ) (case_arm pat_list: [{(Lit_Other "*")}] action: [ (C {(echo)} {(DQ ("trailing garbage found in series file: ") ($ VSub_Name "$garbage"))} ) (C {(exit)} {(1)}) ] spids: [501 502 516 -1] ) ] 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: True ) terminator: <Op_Semi ";"> ) ] action: [ (C {(echo)} {(DQ ($ VSub_Name "$patch_name") (" doesn't exist. Skipping."))}) (ControlFlow token:<ControlFlow_Continue continue>) ] spids: [-1 540] ) ] spids: [-1 554] ) (C {(echo)} {($ VSub_Name "$patch_name")}) (AndOr children: [ (SimpleCommand words: [ {(git)} {(mailinfo)} {(DQ ($ VSub_Name "$tmp_msg"))} {(DQ ($ VSub_Name "$tmp_patch"))} ] redirects: [ (Redir op_id: Redir_Less fd: -1 arg_word: {(DQ ($ VSub_Name "$QUILT_PATCHES") (/) ($ VSub_Name "$patch_name"))} spids: [576] ) (Redir op_id: Redir_Great fd: -1 arg_word: {(DQ ($ VSub_Name "$tmp_info"))} spids: [583] ) ] ) (C {(exit)} {(3)}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(test)} {(-s)} {(DQ ($ VSub_Name "$tmp_patch"))}) (BraceGroup children: [ (C {(echo)} {(DQ ("Patch is empty. Was it split wrong?"))}) (C {(exit)} {(1)}) ] spids: [605] ) ] op_id: Op_DPipe ) (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 children: [ (C {(test)} {(-z)} {(DQ ($ VSub_Name "$GIT_AUTHOR_EMAIL"))}) (C {(test)} {(-z)} {(DQ ($ VSub_Name "$GIT_AUTHOR_NAME"))}) ] op_id: Op_DAmp ) 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: [-1 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: -1 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: -1 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 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] ) (AndOr children: [ (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] ) (AndOr children: [ (C {(test)} {(SQ )} {(KW_Bang "!") (Lit_Other "=")} {(DQ ($ VSub_Name "$patch_author_name"))} ) (AndOr children: [ (C {(test)} {(SQ )} {(KW_Bang "!") (Lit_Other "=")} {(DQ ($ VSub_Name "$patch_author_email"))} ) (AndOr children: [ (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] ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] 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: False ) ] ) left_token: <Left_CommandSub "$("> spids: [959 973] ) } spids: [958] ) ] spids: [958] ) ] spids: [-1 955] ) ] spids: [-1 976] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$dry_run"))} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [ (AndOr 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"))} ) (AndOr children: [ (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] ) (AndOr children: [ (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: False ) ] ) left_token: <Left_CommandSub "$("> spids: [1031 1062] ) } spids: [1030] ) ] spids: [1030] ) (AndOr children: [ (C {(git)} {(update-ref)} {(-m)} {(DQ ("quiltimport: ") ($ VSub_Name "$patch_name"))} {(HEAD)} {($ VSub_Name "$commit")} ) (C {(exit)} {(4)}) ] op_id: Op_DPipe ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] spids: [-1 994] ) ] spids: [-1 1089] ) ] spids: [407 1091] ) redirects: [ (Redir op_id: Redir_Less fd: 3 arg_word: {(DQ ($ VSub_Name "$QUILT_SERIES"))} spids: [1093] ) ] ) (AndOr children: [(C {(rm)} {(-rf)} {($ VSub_Name "$tmp_dir")}) (C {(exit)} {(5)})] op_id: Op_DPipe ) ] )