(CommandList children: [ (Sentence child: (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GIT_DIR) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(git)} {(rev-parse)} {(-q)} {(--git-dir)})] ) left_token: <Left_CommandSub "$("> spids: [17 25] ) } spids: [16] ) ] spids: [16] ) (C {(Lit_Other ":")}) ] op_id: Op_DPipe ) terminator: <Op_Semi ";"> ) (FuncDef name: get_default_remote body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:curr_branch) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(git)} {(symbolic-ref)} {(-q)} {(HEAD)})] ) left_token: <Left_CommandSub "$("> spids: [42 50] ) } spids: [41] ) ] spids: [41] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:curr_branch) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name curr_branch> suffix_op: (StringUnary op_id: VOp1_Pound arg_word: {(refs) (Lit_Slash /) (heads) (Lit_Slash /)} ) spids: [55 62] ) ) } spids: [53] ) ] spids: [53] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:origin) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(git)} {(config)} {(--get)} {(DQ (branch.) ($ VSub_Name "$curr_branch") (.remote))} ) ] ) left_token: <Left_CommandSub "$("> spids: [67 79] ) } spids: [66] ) ] spids: [66] ) (C {(echo)} { (BracedVarSub token: <VSub_Name origin> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(origin)}) spids: [84 88] ) } ) ] spids: [38] ) spids: [33 37] ) (FuncDef name: get_remote_merge_branch body: (BraceGroup children: [ (Case to_match: {(DQ ($ VSub_Pound "$#"))} arms: [ (case_arm pat_list: [{(0)} {(1)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:origin) op: Equal rhs: {(DQ ($ VSub_Number "$1"))} spids: [116] ) ] spids: [116] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:default) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(get_default_remote)})]) left_token: <Left_CommandSub "$("> spids: [123 125] ) } spids: [122] ) ] spids: [122] ) (AndOr children: [ (C {(test)} {(-z)} {(DQ ($ VSub_Name "$origin"))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:origin) op: Equal rhs: {($ VSub_Name "$default")} spids: [138] ) ] spids: [138] ) ] op_id: Op_DAmp ) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:curr_branch) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(git)} {(symbolic-ref)} {(-q)} {(HEAD)})] ) left_token: <Left_CommandSub "$("> spids: [143 151] ) } spids: [142] ) ] spids: [142] ) (AndOr children: [ (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$origin"))} {(Lit_Other "=")} {(DQ ($ VSub_Name "$default"))} {(Lit_Other "]")} ) (C {(echo)} { (CommandSubPart command_list: (CommandList children: [ (C {(git)} {(for-each-ref)} {(--format) (Lit_Other "=") (SQ <"%(upstream)">)} {($ VSub_Name "$curr_branch")} ) ] ) left_token: <Left_CommandSub "$("> spids: [175 187] ) } ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] spids: [110 113 190 -1] ) (case_arm pat_list: [{(Lit_Other "*")}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:repo) op: Equal rhs: {($ VSub_Number "$1")} spids: [197] ) ] spids: [197] ) (C {(shift)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ref) op: Equal rhs: {($ VSub_Number "$1")} spids: [204] ) ] spids: [204] ) (Case to_match: {(DQ ($ VSub_Name "$ref"))} arms: [ (case_arm pat_list: [{(Lit_Other "+") (Lit_Other "*")}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ref) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(DQ (z) ($ VSub_Name "$ref"))} {(Lit_Other ":")} {(SQ <"z+\\(.*\\)">)} ) ] ) left_token: <Left_CommandSub "$("> spids: [231 244] ) } spids: [230] ) ] spids: [230] ) ] spids: [225 227 247 -1] ) ] spids: [216 222 250] ) (AndOr children: [ (SimpleCommand words: [ {(expr)} {(DQ (z) ($ VSub_Name "$ref"))} {(Lit_Other ":")} {(SQ <"z.*:">)} ] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(/dev/null)} spids: [266] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ref) op: Equal rhs: {(DQ (${ VSub_Name ref) (":"))} spids: [271] ) ] spids: [271] ) ] op_id: Op_DPipe ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:remote) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(DQ (z) ($ VSub_Name "$ref"))} {(Lit_Other ":")} {(SQ <"z\\([^:]*\\):">)} ) ] ) left_token: <Left_CommandSub "$("> spids: [281 294] ) } spids: [280] ) ] spids: [280] ) (Case to_match: {(DQ ($ VSub_Name "$remote"))} arms: [ (case_arm pat_list: [{(SQ )} {(HEAD)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:remote) op: Equal rhs: {(HEAD)} spids: [315] ) ] spids: [315] ) ] spids: [-1 313 318 -1] ) (case_arm pat_list: [{(heads/) (Lit_Other "*")}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:remote) op: Equal rhs: { (BracedVarSub token: <VSub_Name remote> suffix_op: (StringUnary op_id: VOp1_Pound arg_word: {(heads) (Lit_Slash /)} ) spids: [326 331] ) } spids: [325] ) ] spids: [325] ) ] spids: [321 323 333 -1] ) (case_arm pat_list: [{(refs/heads/) (Lit_Other "*")}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:remote) op: Equal rhs: { (BracedVarSub token: <VSub_Name remote> suffix_op: (StringUnary op_id: VOp1_Pound arg_word: {(refs) (Lit_Slash /) (heads) (Lit_Slash /)} ) spids: [341 348] ) } spids: [340] ) ] spids: [340] ) ] spids: [336 338 350 -1] ) (case_arm pat_list: [ {(refs/) (Lit_Other "*")} {(tags/) (Lit_Other "*")} {(remotes/) (Lit_Other "*")} ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:remote) op: Equal rhs: {(SQ )} spids: [368] ) ] spids: [368] ) ] spids: [353 366 -1 371] ) ] spids: [297 303 371] ) (AndOr children: [ (C {(Lit_Other "[")} {(-n)} {(DQ ($ VSub_Name "$remote"))} {(Lit_Other "]")}) (Case to_match: {(DQ ($ VSub_Name "$repo"))} arms: [ (case_arm pat_list: [{(.)}] action: [(C {(echo)} {(DQ (refs/heads/) ($ VSub_Name "$remote"))})] spids: [395 396 407 -1] ) (case_arm pat_list: [{(Lit_Other "*")}] action: [ (C {(echo)} { (DQ (refs/remotes/) ($ VSub_Name "$repo") (/) ($ VSub_Name "$remote") ) } ) ] spids: [410 411 424 -1] ) ] spids: [386 392 427] ) ] op_id: Op_DAmp ) ] spids: [193 194 -1 430] ) ] spids: [101 107 430] ) ] spids: [98] ) spids: [93 97] ) (FuncDef name: error_on_missing_default_upstream body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cmd) op: Equal rhs: {(DQ ($ VSub_Number "$1"))} spids: [443] ) ] spids: [443] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:op_type) op: Equal rhs: {(DQ ($ VSub_Number "$2"))} spids: [449] ) ] spids: [449] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:op_prep) op: Equal rhs: {(DQ ($ VSub_Number "$3"))} spids: [455] ) ] spids: [455] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:example) op: Equal rhs: {(DQ ($ VSub_Number "$4"))} spids: [464] ) ] spids: [464] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:branch_name) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(git)} {(symbolic-ref)} {(-q)} {(HEAD)})] ) left_token: <Left_CommandSub "$("> spids: [471 479] ) } spids: [470] ) ] spids: [470] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:display_branch_name) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name branch_name> suffix_op: (StringUnary op_id: VOp1_Pound arg_word: {(refs) (Lit_Slash /) (heads) (Lit_Slash /)} ) spids: [484 491] ) ) } spids: [482] ) ] spids: [482] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:remote) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(gettext)} {(DQ ("<remote>"))})]) left_token: <Left_CommandSub "$("> spids: [501 507] ) ) } spids: [499] ) ] spids: [499] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:branch) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(gettext)} {(DQ ("<branch>"))})]) left_token: <Left_CommandSub "$("> spids: [513 519] ) ) } spids: [511] ) ] spids: [511] ) (If arms: [ (if_arm cond: [ (C {(test)} { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [(C {(git)} {(remote)}) (C {(wc)} {(-l)})] negated: False ) ] ) left_token: <Left_CommandSub "$("> spids: [527 537] ) } {(Lit_Other "=")} {(1)} ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:remote) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(git)} {(remote)})]) left_token: <Left_CommandSub "$("> spids: [548 552] ) } spids: [547] ) ] spids: [547] ) ] spids: [-1 544] ) ] spids: [-1 555] ) (If arms: [ (if_arm cond: [(C {(test)} {(-z)} {(DQ ($ VSub_Name "$branch_name"))})] action: [(C {(gettextln)} {(DQ ("You are not currently on a branch."))})] spids: [-1 570] ) ] else_action: [ (C {(gettextln)} {(DQ ("There is no tracking information for the current branch."))}) ] spids: [580 590] ) (Case to_match: {(DQ ($ VSub_Name "$op_type"))} arms: [ (case_arm pat_list: [{(rebase)}] action: [ (C {(gettextln)} {(DQ ("Please specify which branch you want to rebase against."))}) ] spids: [602 603 613 -1] ) (case_arm pat_list: [{(merge)}] action: [ (C {(gettextln)} {(DQ ("Please specify which branch you want to merge with."))}) ] spids: [616 617 627 -1] ) (case_arm pat_list: [{(Lit_Other "*")}] action: [ (SimpleCommand words: [{(echo)} {(DQ ("BUG: unknown operation type: ") ($ VSub_Name "$op_type"))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[636])] ) (C {(exit)} {(1)}) ] spids: [630 631 650 -1] ) ] spids: [593 599 653] ) (C {(eval_gettextln)} { (DQ ("See git-") (EscapedLiteralPart token:<Lit_EscapedChar "\\$">) ("{cmd}(1) for details.") ) } ) (C {(echo)}) (C {(echo)} {(DQ (" ") ($ VSub_Name "$example"))}) (C {(echo)}) (If arms: [ (if_arm cond: [(C {(test)} {(-n)} {(DQ ($ VSub_Name "$branch_name"))})] action: [ (C {(gettextln)} { (DQ ( "If you wish to set tracking information for this branch you can do so with:" ) ) } ) (C {(echo)}) (C {(echo)} { (DQ (" git branch --set-upstream-to=") ($ VSub_Name "$remote") (/) ($ VSub_Name "$branch") (" ") ($ VSub_Name "$display_branch_name") ) } ) (C {(echo)}) ] spids: [-1 690] ) ] spids: [-1 718] ) (C {(exit)} {(1)}) ] spids: [440] ) spids: [435 439] ) ] )