(command.CommandList children: [ (C {(.)} {(git-sh-i18n)}) (C {(unset)} {(CDPATH)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:IFS) op: assign_op.Equal rhs: {(SQ (Token id:Id.Lit_Chars val:' \t\n' span_id:49))} spids: [47] ) ] ) (command.ShFunction name: git_broken_path_fix body: (command.BraceGroup children: [ (command.Case to_match: {(DQ (':') ($ Id.VSub_DollarName '$PATH') (':'))} arms: [ (case_arm pat_list: [ {(Id.Lit_Star '*') (Id.Lit_Other ':') ($ Id.VSub_Number '$1') (Id.Lit_Other ':') (Id.Lit_Star '*') } ] action: [(C {(Id.Lit_Other ':')} {(ok)})] spids: [72 77 83 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PATH) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:91) command_list: (command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SANE_TOOL_PATH) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [94] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:IFS) op: assign_op.Equal rhs: {(Id.Lit_Other ':')} spids: [100] ) (assign_pair lhs: (sh_lhs_expr.Name name:path) op: assign_op.Equal rhs: (word.Empty) spids: [103] ) (assign_pair lhs: (sh_lhs_expr.Name name:sep) op: assign_op.Equal rhs: (word.Empty) spids: [105] ) ] ) (C {(Id.KW_Set set)} {(x)} {($ Id.VSub_DollarName '$PATH')}) (C {(shift)}) (command.ForEach iter_name: elem do_arg_iter: T body: (command.DoGroup children: [ (command.Case to_match: { (DQ ($ Id.VSub_DollarName '$SANE_TOOL_PATH') (':') ($ Id.VSub_DollarName '$elem') ) } arms: [ (case_arm pat_list: [ {(Id.Lit_QMark '?') (Id.Lit_Star '*') (Id.Lit_Other ':') (/bin) } {(Id.Lit_QMark '?') (Id.Lit_Star '*') (Id.Lit_Other ':') (/usr/bin) } ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:path) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$path') ($ Id.VSub_DollarName '$sep') ($ Id.VSub_DollarName '$SANE_TOOL_PATH') ) } spids: [152] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sep) op: assign_op.Equal rhs: {(Id.Lit_Other ':')} spids: [160] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name: SANE_TOOL_PATH ) op: assign_op.Equal rhs: (word.Empty) spids: [164] ) ] ) ] spids: [137 149 -1 167] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:path) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$path') ($ Id.VSub_DollarName '$sep') ($ Id.VSub_DollarName '$elem') ) } spids: [170] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sep) op: assign_op.Equal rhs: {(Id.Lit_Other ':')} spids: [178] ) ] ) ] ) ) (C {(echo)} {(DQ ($ Id.VSub_DollarName '$path'))}) ] ) ) } spids: [90] ) ] ) ] spids: [86 87 195 -1] ) ] ) ] ) ) (command.ShFunction name: die body: (command.BraceGroup children:[(C {(die_with_status)} {(1)} {(DQ ($ Id.VSub_At '$@'))})]) ) (command.ShFunction name: die_with_status body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:status) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [234] ) ] ) (C {(shift)}) (command.Simple words: [ {(printf)} {(SQ (Token id:Id.Lit_Chars val:'%s\\n' span_id:247))} {(DQ ($ Id.VSub_Star '$*'))} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:243) fd: -1 arg_word: {(2)} ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:255) arg_word: {(DQ ($ Id.VSub_DollarName '$status'))} ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GIT_QUIET) op: assign_op.Equal rhs: (word.Empty) spids: [264] ) ] ) (command.ShFunction name: say body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [(C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$GIT_QUIET'))})] action: [ (C {(printf)} {(SQ (Token id:Id.Lit_Chars val:'%s\\n' span_id:292))} {(DQ ($ Id.VSub_Star '$*'))} ) ] spids: [275 286] ) ] ) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$OPTIONS_SPEC'))}) terminator: (Token id:Id.Op_Semi val:';' span_id:314) ) ] action: [ (command.ShFunction name: usage body: (command.BraceGroup children: [ (C {(DQ ($ Id.VSub_Number '$0'))} {(-h)}) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:333) arg_word: {(1)} ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:parseopt_extra) op: assign_op.Equal rhs: (word.Empty) spids: [342] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(Id.Lit_LBracket '[')} {(-n)} {(DQ ($ Id.VSub_DollarName '$OPTIONS_KEEPDASHDASH'))} {(Id.Lit_RBracket ']')} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:parseopt_extra) op: assign_op.Equal rhs: {(DQ (--keep-dashdash))} spids: [358] ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(Id.Lit_LBracket '[')} {(-n)} {(DQ ($ Id.VSub_DollarName '$OPTIONS_STUCKLONG'))} {(Id.Lit_RBracket ']')} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:parseopt_extra) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$parseopt_extra') (' --stuck-long'))} spids: [377] ) ] ) ] ) (C {(eval)} { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:388) command_list: (command.CommandList children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ Id.VSub_DollarName '$OPTIONS_SPEC'))}) (C {(git)} {(rev-parse)} {(--parseopt)} {($ Id.VSub_DollarName '$parseopt_extra')} {(--)} {(DQ ($ Id.VSub_At '$@'))} ) ] negated: F ) (C {(echo)} {(Id.ControlFlow_Exit exit)} {($ Id.VSub_QMark '$?')}) ] ) ] ) ) ) } ) ] spids: [305 316] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:dashless) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:431) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(basename)} {(--)} {(DQ ($ Id.VSub_Number '$0'))}) (C {(sed)} {(-e)} {(SQ (Token id:Id.Lit_Chars val:'s/-/ /' span_id:447))}) ] negated: F ) ] ) ) } spids: [430] ) ] ) (command.ShFunction name: usage body: (command.BraceGroup children: [ (C {(die)} { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:462) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ('usage: ') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:467) ) ('dashless ') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\$' span_id:469)) (USAGE) ) } ) ] ) ) ) } ) ] ) ) (command.If arms: [ (if_arm cond: [ (C {(Id.Lit_LBracket '[')} {(-z)} {(DQ ($ Id.VSub_DollarName '$LONG_USAGE'))} {(Id.Lit_RBracket ']')} ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LONG_USAGE) op: assign_op.Equal rhs: { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:498) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ('usage: ') (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 503 ) ) ('dashless ') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\$' span_id:505)) (USAGE) ) } ) ] ) ) ) } spids: [496] ) ] ) ] spids: [480 493] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LONG_USAGE) op: assign_op.Equal rhs: { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:517) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ('usage: ') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:522) ) ('dashless ') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\$' span_id:524)) ('USAGE\n') ('\n') ($ Id.VSub_DollarName '$LONG_USAGE') ) } ) ] ) ) ) } spids: [515] ) ] ) ] ) (command.Case to_match: {(DQ ($ Id.VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(-h)}] action: [ (C {(echo)} {(DQ ($ Id.VSub_DollarName '$LONG_USAGE'))}) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:557) ) ] spids: [546 547 -1 560] ) ] ) ] ) (command.ShFunction name: set_reflog_action body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (C {(Id.Lit_LBracket '[')} {(-z)} { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:GIT_REFLOG_ACTION span_id:682) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonPlus arg_word:{(set)}) ) ) } {(Id.Lit_RBracket ']')} ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GIT_REFLOG_ACTION) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Star '$*'))} spids: [694] ) ] ) (C {(export)} {(GIT_REFLOG_ACTION)}) ] spids: [674 691] ) ] ) ] ) ) (command.ShFunction name: git_editor body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (C {(test)} {(-z)} { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:GIT_EDITOR span_id:725) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonPlus arg_word:{(set)}) ) ) } ) ] action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GIT_EDITOR) op: assign_op.Equal rhs: { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:737) command_list: (command.CommandList children: [(C {(git)} {(Id.KW_Var var)} {(GIT_EDITOR)})] ) ) ) } spids: [735] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:748) arg_word: {($ Id.VSub_QMark '$?')} ) ] ) ] spids: [717 732] ) ] ) (C {(eval)} {(DQ ($ Id.VSub_DollarName '$GIT_EDITOR'))} {(SQ (Token id:Id.Lit_Chars val:'"$@"' span_id:764))} ) ] ) ) (command.ShFunction name: git_pager body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [(C {(test)} {(-t)} {(1)})] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GIT_PAGER) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:790) command_list: (command.CommandList children: [(C {(git)} {(Id.KW_Var var)} {(GIT_PAGER)})] ) ) } spids: [789] ) ] ) ] spids: [777 786] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GIT_PAGER) op: assign_op.Equal rhs: {(cat)} spids: [802] ) ] ) ] ) (command.ForEach iter_name: vardef iter_words: [ {(Id.Lit_Other '@') (Id.Lit_Splice '@PAGER_ENV') (Id.Lit_Other '@') (Id.Lit_Other '@')} ] do_arg_iter: F body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:var) op: assign_op.Equal rhs: { (braced_var_sub token: (Token id:Id.VSub_Name val:vardef span_id:826) suffix_op: (suffix_op.Unary op_id:Id.VOp1_DPercent arg_word:{('=*')}) ) } spids: [824] ) ] ) (C {(eval)} { (DQ (': ') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:836) ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\$' span_id:837)) ('{') ($ Id.VSub_DollarName '$vardef') ('}') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:841)) (' && export ') ($ Id.VSub_DollarName '$var') ) } ) ] ) ) (C {(eval)} {(DQ ($ Id.VSub_DollarName '$GIT_PAGER'))} {(SQ (Token id:Id.Lit_Chars val:'"$@"' span_id:858))} ) ] ) ) (command.ShFunction name: sane_grep body: (command.BraceGroup children: [ (command.Simple words: [ {(grep)} {(Id.Lit_Other '@') (Id.Lit_Splice '@SANE_TEXT_GREP') (Id.Lit_Other '@') (Id.Lit_Other '@') } {(DQ ($ Id.VSub_At '$@'))} ] more_env: [ (env_pair name:GREP_OPTIONS val:(word.Empty) spids:[872]) (env_pair name:LC_ALL val:{(C)} spids:[874]) ] ) ] ) ) (command.ShFunction name: sane_egrep body: (command.BraceGroup children: [ (command.Simple words: [ {(egrep)} {(Id.Lit_Other '@') (Id.Lit_Splice '@SANE_TEXT_GREP') (Id.Lit_Other '@') (Id.Lit_Other '@') } {(DQ ($ Id.VSub_At '$@'))} ] more_env: [ (env_pair name:GREP_OPTIONS val:(word.Empty) spids:[899]) (env_pair name:LC_ALL val:{(C)} spids:[901]) ] ) ] ) ) (command.ShFunction name: is_bare_repository body: (command.BraceGroup children:[(C {(git)} {(rev-parse)} {(--is-bare-repository)})]) ) (command.ShFunction name: cd_to_toplevel body: (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DPipe] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cdup) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:944) command_list: (command.CommandList children: [(C {(git)} {(rev-parse)} {(--show-toplevel)})] ) ) } spids: [943] ) ] ) (C {(cd)} {(DQ ($ Id.VSub_DollarName '$cdup'))}) (command.BraceGroup children: [ (command.Simple words: [ {(gettextln)} { (DQ ('Cannot chdir to ') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:970) ) ('cdup, the toplevel of the working tree') ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:974) fd: -1 arg_word: {(2)} ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:978) arg_word: {(1)} ) ] ) ] ) ] ) ) (command.ShFunction name: require_work_tree_exists body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (C {(test)} { (DQ (z) (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1002) command_list: (command.CommandList children: [(C {(git)} {(rev-parse)} {(--is-bare-repository)})] ) ) ) } {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(zfalse)} ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:program_name) op: assign_op.Equal rhs: {($ Id.VSub_Number '$0')} spids: [1020] ) ] ) (C {(die)} { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1027) command_list: (command.CommandList children: [ (C {(gettext)} { (DQ ('fatal: ') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:1032) ) ('program_name cannot be used without a working tree.') ) } ) ] ) ) ) } ) ] spids: [996 1017] ) ] ) ] ) ) (command.ShFunction name: require_work_tree body: (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(test)} { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1055) command_list: (command.CommandList children: [ (command.Simple words: [{(git)} {(rev-parse)} {(--is-inside-work-tree)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:1062) fd: 2 arg_word: {(/dev/null)} ) ] ) ] ) ) ) } {(Id.Lit_Equals '=')} {(true)} ) (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:program_name) op: assign_op.Equal rhs: {($ Id.VSub_Number '$0')} spids: [1076] ) ] ) (C {(die)} { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1083) command_list: (command.CommandList children: [ (C {(gettext)} { (DQ ('fatal: ') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:1088) ) ('program_name cannot be used without a working tree.') ) } ) ] ) ) ) } ) ] ) ] ) ] ) ) (command.ShFunction name: require_clean_work_tree body: (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{(git)} {(rev-parse)} {(--verify)} {(HEAD)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1116) fd: -1 arg_word: {(/dev/null)} ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:1121) arg_word: {(1)} ) ] ) (C {(git)} {(update-index)} {(-q)} {(--ignore-submodules)} {(--refresh)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:err) op: assign_op.Equal rhs: {(0)} spids: [1137] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Pipeline children: [(C {(git)} {(diff-files)} {(--quiet)} {(--ignore-submodules)})] negated: T ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:action) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1158] ) ] ) (command.Case to_match: {(DQ ($ Id.VSub_DollarName '$action'))} arms: [ (case_arm pat_list: [{(rebase)}] action: [ (command.Simple words: [{(gettextln)} {(DQ ('Cannot rebase: You have unstaged changes.'))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:1181) fd: -1 arg_word: {(2)} ) ] ) ] spids: [1171 1172 1185 -1] ) (case_arm pat_list: [{(DQ ('rewrite branches'))}] action: [ (command.Simple words: [ {(gettextln)} {(DQ ('Cannot rewrite branches: You have unstaged changes.'))} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:1200) fd: -1 arg_word: {(2)} ) ] ) ] spids: [1188 1191 1204 -1] ) (case_arm pat_list: [{(DQ ('pull with rebase'))}] action: [ (command.Simple words: [ {(gettextln)} {(DQ ('Cannot pull with rebase: You have unstaged changes.'))} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:1219) fd: -1 arg_word: {(2)} ) ] ) ] spids: [1207 1210 1223 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.Simple words: [ {(eval_gettextln)} { (DQ ('Cannot ') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:1234) ) ('action: You have unstaged changes.') ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:1238) fd: -1 arg_word: {(2)} ) ] ) ] spids: [1226 1227 1242 -1] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:err) op: assign_op.Equal rhs: {(1)} spids: [1248] ) ] ) ] spids: [1142 1155] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Pipeline children: [ (C {(git)} {(diff-index)} {(--cached)} {(--quiet)} {(--ignore-submodules)} {(HEAD)} {(--)} ) ] negated: T ) ] action: [ (command.If arms: [ (if_arm cond: [ (C {(test)} {($ Id.VSub_DollarName '$err')} {(Id.Lit_Equals '=')} {(0)}) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:action) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1292] ) ] ) (command.Case to_match: {(DQ ($ Id.VSub_DollarName '$action'))} arms: [ (case_arm pat_list: [{(rebase)}] action: [ (command.Simple words: [ {(gettextln)} { (DQ ( 'Cannot rebase: Your index contains uncommitted changes.' ) ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:1315) fd: -1 arg_word: {(2)} ) ] ) ] spids: [1305 1306 1319 -1] ) (case_arm pat_list: [{(DQ ('pull with rebase'))}] action: [ (command.Simple words: [ {(gettextln)} { (DQ ( 'Cannot pull with rebase: Your index contains uncommitted changes.' ) ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:1334) fd: -1 arg_word: {(2)} ) ] ) ] spids: [1322 1325 1338 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.Simple words: [ {(eval_gettextln)} { (DQ ('Cannot ') (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 1349 ) ) ('action: Your index contains uncommitted changes.') ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:1353) fd: -1 arg_word: {(2)} ) ] ) ] spids: [1341 1342 1357 -1] ) ] ) ] spids: [1278 1289] ) ] else_action: [ (command.Simple words: [ {(gettextln)} {(DQ ('Additionally, your index contains uncommitted changes.'))} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:1372) fd: -1 arg_word: {(2)} ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:err) op: assign_op.Equal rhs: {(1)} spids: [1379] ) ] ) ] spids: [1256 1275] ) ] ) (command.If arms: [ (if_arm cond: [(C {(test)} {($ Id.VSub_DollarName '$err')} {(Id.Lit_Equals '=')} {(1)})] action: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {(-n)} {(DQ ($ Id.VSub_Number '$2'))}) (command.Simple words: [{(echo)} {(DQ ($ Id.VSub_Number '$2'))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:1417) fd: -1 arg_word: {(2)} ) ] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:1421) arg_word: {(1)} ) ] spids: [1387 1398] ) ] ) ] ) ) (command.ShFunction name: pick_ident_script body: (command.BraceGroup children: [ (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:1466) cond: [(C {(test)} {($ Id.VSub_Pound '$#')} {(-gt)} {(0)})] body: (command.DoGroup children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lid) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1480] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:1482) ) (C {(shift)}) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:uid) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1487] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:1489) ) (C {(shift)}) (C {(printf)} {(SQ (Token id:Id.Lit_Chars val:'%s' span_id:1497))} { (DQ ('\n') ('\t\t/^') ($ Id.VSub_DollarName '$lid') (' /{\n') ("\t\t\ts/'/'") (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\\\' span_id:1506) ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\\\' span_id:1507)) ("''/g\n") ('\t\t\th\n') ('\t\t\ts/^') ($ Id.VSub_DollarName '$lid') (' ') ) (SQ (Token id:Id.Lit_Chars val:'\\([^<]*\\) <[^>]*> .*$/\\1/' span_id:1515)) (DQ ('\n') ('\t\t\ts/.*/GIT_') (${ Id.VSub_Name uid) ("_NAME='&'/p\n") ('\n') ('\t\t\tg\n') ('\t\t\ts/^') ($ Id.VSub_DollarName '$lid') (' ') ) (SQ (Token id:Id.Lit_Chars val:'[^<]* <\\([^>]*\\)> .*$/\\1/' span_id:1531)) (DQ ('\n') ('\t\t\ts/.*/GIT_') (${ Id.VSub_Name uid) ("_EMAIL='&'/p\n") ('\n') ('\t\t\tg\n') ('\t\t\ts/^') ($ Id.VSub_DollarName '$lid') (' ') ) (SQ (Token id:Id.Lit_Chars val:'[^<]* <[^>]*> \\(.*\\)$/@\\1/' span_id:1547)) (DQ ('\n') ('\t\t\ts/.*/GIT_') (${ Id.VSub_Name uid) ("_DATE='&'/p\n") ('\t\t}\n') ('\t\t') ) } ) ] ) ) (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:'/^$/q' span_id:1567))}) ] ) ) (command.ShFunction name: parse_ident_from_commit body: (command.BraceGroup children: [ (command.Simple words: [ {(sed)} {(-ne)} { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1598) command_list: (command.CommandList children: [(C {(pick_ident_script)} {(DQ ($ Id.VSub_At '$@'))})] ) ) ) } ] more_env: [ (env_pair name:LANG val:{(C)} spids:[1587]) (env_pair name:LC_ALL val:{(C)} spids:[1590]) ] ) ] ) ) (command.ShFunction name: get_author_ident_from_commit body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:encoding) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1625) command_list: (command.CommandList children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(git)} {(config)} {(i18n.commitencoding)}) (C {(echo)} {(UTF-8)}) ] ) ] ) ) } spids: [1624] ) ] ) (command.Pipeline children: [ (C {(git)} {(show)} {(-s)} {(--pretty) (Id.Lit_Equals '=') (raw)} {(--encoding) (Id.Lit_Equals '=') (DQ ($ Id.VSub_DollarName '$encoding'))} {(DQ ($ Id.VSub_Number '$1'))} {(--)} ) (C {(parse_ident_from_commit)} {(author)} {(AUTHOR)}) ] negated: F ) ] ) ) (command.ShFunction name: clear_local_git_env body: (command.BraceGroup children: [ (C {(unset)} { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1692) command_list: (command.CommandList children: [(C {(git)} {(rev-parse)} {(--local-env-vars)})] ) ) } ) ] ) ) (command.ShFunction name: create_virtual_base body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sz0) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1717) command_list: (command.CommandList children: [ (command.Simple words: [{(wc)} {(-c)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Less val:'<' span_id:1722) fd: -1 arg_word: {(DQ ($ Id.VSub_Number '$1'))} ) ] ) ] ) ) } spids: [1716] ) ] ) (command.Pipeline children: [ (C {(Id.Lit_Other '@') (Id.Lit_Splice '@DIFF') (Id.Lit_Other '@') (Id.Lit_Other '@')} {(-u)} {(-La/) (DQ ($ Id.VSub_Number '$1'))} {(-Lb/) (DQ ($ Id.VSub_Number '$1'))} {(DQ ($ Id.VSub_Number '$1'))} {(DQ ($ Id.VSub_Number '$2'))} ) (C {(git)} {(apply)} {(--no-add)}) ] negated: F ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sz1) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1764) command_list: (command.CommandList children: [ (command.Simple words: [{(wc)} {(-c)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Less val:'<' span_id:1769) fd: -1 arg_word: {(DQ ($ Id.VSub_Number '$1'))} ) ] ) ] ) ) } spids: [1763] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [ {(expr)} {($ Id.VSub_DollarName '$sz0')} { (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\<' span_id:1789) ) } {($ Id.VSub_DollarName '$sz1')} { (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\*' span_id:1793) ) } {(2)} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1797) fd: -1 arg_word: {(/dev/null)} ) ] ) (command.Simple words: [{(Id.Lit_Other ':')}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1804) fd: -1 arg_word: {(DQ ($ Id.VSub_Number '$1'))} ) ] ) ] ) ] ) ) (command.Case to_match: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1818) command_list: (command.CommandList children:[(C {(uname)} {(-s)})]) ) } arms: [ (case_arm pat_list: [{(Id.Lit_Star '*') (MINGW) (Id.Lit_Star '*')}] action: [ (command.ShFunction name: sort body: (command.BraceGroup children:[(C {(/usr/bin/sort)} {(DQ ($ Id.VSub_At '$@'))})]) ) (command.ShFunction name: find body: (command.BraceGroup children:[(C {(/usr/bin/find)} {(DQ ($ Id.VSub_At '$@'))})]) ) (command.ShFunction name: pwd body: (command.BraceGroup children:[(C {(builtin)} {(pwd)} {(-W)})]) ) (command.ShFunction name: is_absolute_path body: (command.BraceGroup children: [ (command.Case to_match: {(DQ ($ Id.VSub_Number '$1'))} arms: [ (case_arm pat_list: [ {(Id.Lit_LBracket '[') (/) (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\\\' span_id:1913) ) (Id.Lit_RBracket ']') (Id.Lit_Star '*') } {(Id.Lit_LBracket '[') (A-Za-z) (Id.Lit_RBracket ']') (Id.Lit_Other ':') (Id.Lit_Star '*') } ] action: [ (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:1927) arg_word: {(0)} ) ] spids: [1911 1924 1931 -1] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:1937) arg_word: {(1)} ) ] ) ) ] spids: [1826 1829 1945 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.ShFunction name: is_absolute_path body: (command.BraceGroup children: [ (command.Case to_match: {(DQ ($ Id.VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(/) (Id.Lit_Star '*')}] action: [ (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:1973) arg_word: {(0)} ) ] spids: [1968 1970 1977 -1] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:1983) arg_word: {(1)} ) ] ) ) ] spids: [1947 1948 -1 1990] ) ] ) (command.ShFunction name: git_dir_init body: (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GIT_DIR) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2008) command_list: (command.CommandList children: [(C {(git)} {(rev-parse)} {(--git-dir)})] ) ) } spids: [2007] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:2018) ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Id.Lit_LBracket '[')} {(-z)} {(DQ ($ Id.VSub_DollarName '$SUBDIRECTORY_OK'))} {(Id.Lit_RBracket ']')} ) ] action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(test)} {(-z)} { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2042) command_list: (command.CommandList children: [(C {(git)} {(rev-parse)} {(--show-cdup)})] ) ) ) } ) (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:exit) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [2056] ) ] ) (command.Simple words: [ {(gettextln)} { (DQ ( 'You need to run this command from the toplevel of the working tree.' ) ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:2066) fd: -1 arg_word: {(2)} ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:2070) arg_word: {($ Id.VSub_DollarName '$exit')} ) ] ) ] ) ] spids: [2021 2034] ) ] ) (command.AndOr ops: [Id.Op_DAmp Id.Op_DPipe] children: [ (C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GIT_DIR) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2092) command_list: (command.CommandList children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(cd)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR'))}) (C {(pwd)}) ] ) ] ) ) } spids: [2091] ) ] ) (command.BraceGroup children: [ (command.Simple words: [ {(gettextln)} {(DQ ('Unable to determine absolute path of git directory'))} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:2115) fd: -1 arg_word: {(2)} ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:2119) arg_word: {(1)} ) ] ) ] ) (C {(Id.Lit_Other ':')} { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:GIT_OBJECT_DIRECTORY span_id:2131) suffix_op: (suffix_op.Unary op_id: Id.VTest_Equals arg_word: { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2134) command_list: (command.CommandList children: [(C {(git)} {(rev-parse)} {(--git-path)} {(objects)})] ) ) ) } ) ) ) } ) ] ) ) (command.If arms: [ (if_arm cond: [(C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$NONGIT_OK'))})] action: [(C {(git_dir_init)})] spids: [2150 2160] ) ] ) (command.ShFunction name: peel_committish body: (command.BraceGroup children: [ (command.Case to_match: {(DQ ($ Id.VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(Id.Lit_Other ':') (/) (Id.Lit_Star '*')}] action: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:peeltmp) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2192) command_list: (command.CommandList children: [ (C {(git)} {(rev-parse)} {(--verify)} {(DQ ($ Id.VSub_Number '$1'))} ) ] ) ) } spids: [2191] ) ] ) (C {(git)} {(rev-parse)} {(--verify)} {(DQ (${ Id.VSub_Name peeltmp) ('^0'))}) ] ) ] spids: [2185 2188 2221 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [(C {(git)} {(rev-parse)} {(--verify)} {(DQ (${ Id.VSub_Number 1) ('^0'))})] spids: [2224 2225 2242 -1] ) ] ) ] ) ) ] )