(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:USAGE) op: Equal rhs: {(DQ ('(edit [-F <file> | -m <msg>] | show) [commit]'))} spids: [4] ) ] spids: [4] ) (C {(.)} {(git-sh-setup)}) (AndOr ops: [Op_DAmp] children: [(C {(test)} {(-z)} {(DQ ($ VSub_Number '$1'))}) (C {(usage)})] ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ACTION) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [26] ) ] spids: [26] ) terminator: <Op_Semi ';'> ) (C {(shift)}) (AndOr ops: [Op_DAmp] children: [ (C {(test)} {(-z)} {(DQ ($ VSub_Name '$GIT_NOTES_REF'))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GIT_NOTES_REF) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(git)} {(config)} {(core.notesref)})]) left_token: <Left_CommandSub '$('> spids: [47 53] ) ) } spids: [45] ) ] spids: [45] ) ] ) (AndOr ops: [Op_DAmp] children: [ (C {(test)} {(-z)} {(DQ ($ VSub_Name '$GIT_NOTES_REF'))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GIT_NOTES_REF) op: Equal rhs: {(DQ (refs/notes/commits))} spids: [66] ) ] spids: [66] ) ] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:MESSAGE) op:Equal rhs:{(EmptyPart)} spids:[72])] spids: [72] ) (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: [{(-m)}] action: [ (AndOr ops: [Op_DPipe] children: [ (C {(test)} {(DQ ($ VSub_Name '$ACTION'))} {(Lit_Other '=')} {(DQ (edit))}) (C {(usage)}) ] ) (C {(shift)}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(test)} {(DQ ($ VSub_Pound '$#'))} {(Lit_Other '=')} {(DQ (0))}) terminator: <Op_Semi ';'> ) ] action: [(C {(die)} {(DQ ('error: option -m needs an argument'))})] spids: [16777215 136] ) ] else_action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$MESSAGE'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:MESSAGE) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [165] ) ] spids: [165] ) ] spids: [16777215 162] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:MESSAGE) op: Equal rhs: { (DQ ($ VSub_Name '$MESSAGE') ('\n') ('\n') ($ VSub_Number '$1')) } spids: [174] ) ] spids: [174] ) ] spids: [171 183] ) (C {(shift)}) ] spids: [146 189] ) ] spids: [97 98 192 16777215] ) (case_arm pat_list: [{(-F)}] action: [ (AndOr ops: [Op_DPipe] children: [ (C {(test)} {(DQ ($ VSub_Name '$ACTION'))} {(Lit_Other '=')} {(DQ (edit))}) (C {(usage)}) ] ) (C {(shift)}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(test)} {(DQ ($ VSub_Pound '$#'))} {(Lit_Other '=')} {(DQ (0))}) terminator: <Op_Semi ';'> ) ] action: [(C {(die)} {(DQ ('error: option -F needs an argument'))})] spids: [16777215 234] ) ] else_action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$MESSAGE'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:MESSAGE) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [(C {(cat)} {(DQ ($ VSub_Number '$1'))})] ) left_token: <Left_CommandSub '$('> spids: [265 271] ) ) } spids: [263] ) ] spids: [263] ) ] spids: [16777215 260] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:MESSAGE) op: Equal rhs: { (DQ ($ VSub_Name '$MESSAGE') ('\n') ('\n') (CommandSubPart command_list: (CommandList children: [(C {(cat)} {(DQ ($ VSub_Number '$1'))})] ) left_token: <Left_CommandSub '$('> spids: [283 289] ) ) } spids: [278] ) ] spids: [278] ) ] spids: [275 293] ) (C {(shift)}) ] spids: [244 299] ) ] spids: [195 196 302 16777215] ) (case_arm pat_list: [{(-) (Lit_Other '*')}] action: [(C {(usage)})] spids: [305 307 313 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [(ControlFlow token:<ControlFlow_Break break>)] spids: [316 317 323 16777215] ) ] spids: [88 94 326] ) ] spids: [85 328] ) ) (AndOr ops: [Op_DPipe] children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COMMIT) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(git)} {(rev-parse)} {(--verify)} {(--default)} {(HEAD)} {(DQ ($ VSub_At '$@'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [332 346] ) } spids: [331] ) ] spids: [331] ) (C {(die)} {(DQ ('Invalid commit: ') ($ VSub_At '$@'))}) ] ) (Case to_match: {(DQ ($ VSub_Name '$ACTION'))} arms: [ (case_arm pat_list: [{(edit)}] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} { (DQ (BracedVarSub token: <VSub_Name GIT_NOTES_REF> suffix_op: (StringUnary op_id: VOp1_Pound arg_word: {(refs) (Lit_Slash /) (notes) (Lit_Slash /)} ) spids: [375 382] ) ) } {(Lit_Other '=')} {(DQ ($ VSub_Name '$GIT_NOTES_REF'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(die)} { (DQ ('Refusing to edit notes in ') ($ VSub_Name '$GIT_NOTES_REF') (' (outside of refs/notes/)') ) } ) ] spids: [16777215 394] ) ] spids: [16777215 406] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:MSG_FILE) op: Equal rhs: {(DQ ($ VSub_Name '$GIT_DIR') (/new-notes-) ($ VSub_Name '$COMMIT'))} spids: [410] ) ] spids: [410] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GIT_INDEX_FILE) op: Equal rhs: {(DQ ($ VSub_Name '$MSG_FILE') (.idx))} spids: [418] ) ] spids: [418] ) (C {(export)} {(GIT_INDEX_FILE)}) (C {(trap)} { (SQ <'\n'> <'\t\ttest -f "$MSG_FILE" && rm "$MSG_FILE"\n'> <'\t\ttest -f "$GIT_INDEX_FILE" && rm "$GIT_INDEX_FILE"\n'> <'\t'> ) } {(0)} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:CURRENT_HEAD) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(git)} {(show-ref)} {(DQ ($ VSub_Name '$GIT_NOTES_REF'))}) (C {(cut)} {(-f)} {(1)} {(-d)} {(SQ <' '>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [445 467] ) } spids: [444] ) ] spids: [444] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$CURRENT_HEAD'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PARENT) op: Equal rhs: {(EmptyPart)} spids: [486] ) ] spids: [486] ) ] spids: [16777215 483] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PARENT) op: Equal rhs: {(DQ ('-p ') ($ VSub_Name '$CURRENT_HEAD'))} spids: [492] ) ] spids: [492] ) (AndOr ops: [Op_DPipe] children: [ (C {(git)} {(read-tree)} {(DQ ($ VSub_Name '$GIT_NOTES_REF'))}) (C {(die)} {(DQ ('Could not read index'))}) ] ) ] spids: [489 516] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$MESSAGE'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Pipeline children: [ (SimpleCommand words: [{(git)} {(log)} {(-1)} {($ VSub_Name '$COMMIT')}] more_env: [(env_pair name:GIT_NOTES_REF val:{(EmptyPart)} spids:[536])] ) (SimpleCommand words: [{(sed)} {(DQ ('s/^/#/'))}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ ($ VSub_Name '$MSG_FILE'))} spids: [554] ) ] ) ] negated: F ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(-z)} {(DQ ($ VSub_Name '$CURRENT_HEAD'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [ {(git)} {(cat-file)} {(blob)} {(Lit_Other ':') ($ VSub_Name '$COMMIT')} ] redirects: [ (Redir op_id: Redir_DGreat fd: 16777215 arg_word: {(DQ ($ VSub_Name '$MSG_FILE'))} spids: [588] ) (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [594] ) ] ) ] spids: [16777215 576] ) ] spids: [16777215 599] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:core_editor) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [(C {(git)} {(config)} {(core.editor)})] ) left_token: <Left_CommandSub '$('> spids: [604 610] ) ) } spids: [602] ) ] spids: [602] ) (C { (BracedVarSub token: <VSub_Name GIT_EDITOR> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: { (BracedVarSub token: <VSub_Name core_editor> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: { (BracedVarSub token: <VSub_Name VISUAL> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: { (BracedVarSub token: <VSub_Name EDITOR> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {(vi)} ) spids: [623 627] ) } ) spids: [620 628] ) } ) spids: [617 629] ) } ) spids: [614 630] ) } {(DQ ($ VSub_Name '$MSG_FILE'))} ) ] spids: [16777215 533] ) ] else_action: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$MESSAGE'))}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ ($ VSub_Name '$MSG_FILE'))} spids: [646] ) ] ) ] spids: [637 653] ) (Pipeline children: [ (SimpleCommand words: [{(grep)} {(-v)} {(Lit_Other '^') (Lit_Pound '#')}] redirects: [ (Redir op_id: Redir_Less fd: 16777215 arg_word: {(DQ ($ VSub_Name '$MSG_FILE'))} spids: [664] ) ] ) (SimpleCommand words: [{(git)} {(stripspace)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ ($ VSub_Name '$MSG_FILE')) (.processed)} spids: [676] ) ] ) ] negated: F ) (C {(mv)} {(DQ ($ VSub_Name '$MSG_FILE')) (.processed)} {(DQ ($ VSub_Name '$MSG_FILE'))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-s)} {(DQ ($ VSub_Name '$MSG_FILE'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DPipe] children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:BLOB) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(git)} {(hash-object)} {(-w)} {(DQ ($ VSub_Name '$MSG_FILE'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [713 723] ) } spids: [712] ) ] spids: [712] ) (C {(die)} {(DQ ('Could not write into object database'))}) ] ) (AndOr ops: [Op_DPipe] children: [ (C {(git)} {(update-index)} {(--add)} {(--cacheinfo)} {(0644)} {($ VSub_Name '$BLOB')} {($ VSub_Name '$COMMIT')} ) (C {(die)} {(DQ ('Could not write index'))}) ] ) ] spids: [16777215 709] ) ] else_action: [ (AndOr ops: [Op_DAmp] children: [ (C {(test)} {(-z)} {(DQ ($ VSub_Name '$CURRENT_HEAD'))}) (C {(die)} {(DQ ('Will not initialise with empty tree'))}) ] ) (AndOr ops: [Op_DPipe] children: [ (C {(git)} {(update-index)} {(--force-remove)} {($ VSub_Name '$COMMIT')}) (C {(die)} {(DQ ('Could not update index'))}) ] ) ] spids: [759 798] ) (AndOr ops: [Op_DPipe] 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: [803 807] ) } spids: [802] ) ] spids: [802] ) (C {(die)} {(DQ ('Could not write tree'))}) ] ) (AndOr ops: [Op_DPipe] children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:NEW_HEAD) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(Annotate)} {($ VSub_Name '$COMMIT')}) (C {(git)} {(commit-tree)} {($ VSub_Name '$TREE')} {($ VSub_Name '$PARENT')} ) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [819 835] ) } spids: [818] ) ] spids: [818] ) (C {(die)} {(DQ ('Could not annotate'))}) ] ) (C {(git)} {(update-ref)} {(-m)} {(DQ ('Annotate ') ($ VSub_Name '$COMMIT'))} {(DQ ($ VSub_Name '$GIT_NOTES_REF'))} {($ VSub_Name '$NEW_HEAD')} {($ VSub_Name '$CURRENT_HEAD')} ) ] spids: [366 367 868 16777215] ) (case_arm pat_list: [{(show)}] action: [ (AndOr ops: [Op_DPipe] children: [ (SimpleCommand words: [ {(git)} {(rev-parse)} {(-q)} {(--verify)} {(DQ ($ VSub_Name '$GIT_NOTES_REF')) (Lit_Other ':') ($ VSub_Name '$COMMIT')} ] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [888] ) ] ) (C {(die)} {(DQ ('No note for commit ') ($ VSub_Name '$COMMIT') (.))}) ] ) (C {(git)} {(show)} {(DQ ($ VSub_Name '$GIT_NOTES_REF')) (Lit_Other ':') ($ VSub_Name '$COMMIT')} ) ] spids: [870 871 914 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [(C {(usage)})] spids: [916 917 16777215 922] ) ] spids: [358 364 922] ) ] )