(List (AndOr OP_OR_IF (= scope= flags=0 words=[] bindings=[('GIT_DIR', {[ComSub (Com {[LIT_CHARS git]} {[LIT_CHARS rev-parse]} {[LIT_CHARS -q]} {[LIT_CHARS --git-dir]})]})]) (Com {[LIT_OTHER ":"]} ) ) (FunctionDef get_default_remote [] (List (= scope= flags=0 words=[] bindings=[('curr_branch', {[ComSub (Com {[LIT_CHARS git]} {[LIT_CHARS symbolic-ref]} {[LIT_CHARS -q]} {[LIT_CHARS HEAD]})]})]) (= scope= flags=0 words=[] bindings=[('curr_branch', {[DQ [VarSub curr_branch transform_ops=[VS_UNARY_POUND {[LIT_CHARS refs] [LIT_SLASH /] [LIT_CHARS heads] [LIT_SLASH /]}]]]})]) (= scope= flags=0 words=[] bindings=[('origin', {[ComSub (Com {[LIT_CHARS git]} {[LIT_CHARS config]} {[LIT_CHARS --get]} {[DQ [LIT_CHARS branch.][VarSub curr_branch][LIT_CHARS .remote]]})]})]) (Com {[LIT_CHARS echo]} {[VarSub origin test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS origin]}]} ) ) ) (FunctionDef get_remote_merge_branch [] (Case to_match={[DQ [VarSub #]]}, pat_word_list=[[{[LIT_CHARS 0]}, {[LIT_CHARS 1]}], [{[LIT_OTHER "*"]}]] (List (= scope= flags=0 words=[] bindings=[('origin', {[DQ [VarSub 1]]})]) (= scope= flags=0 words=[] bindings=[('default', {[ComSub (Com {[LIT_CHARS get_default_remote]})]})]) (AndOr OP_AND_IF (Com {[LIT_CHARS test]} {[LIT_CHARS -z]} {[DQ [VarSub origin]]} ) (= scope= flags=0 words=[] bindings=[('origin', {[VarSub default]})]) ) (AndOr OP_AND_IF (= scope= flags=0 words=[] bindings=[('curr_branch', {[ComSub (Com {[LIT_CHARS git]} {[LIT_CHARS symbolic-ref]} {[LIT_CHARS -q]} {[LIT_CHARS HEAD]})]})]) (AndOr OP_AND_IF (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [VarSub origin]]} {[LIT_DBRACKET_LIKE "="]} {[DQ [VarSub default]]} {[LIT_DBRACKET_LIKE "]"]} ) (Com {[LIT_CHARS echo]} {[ComSub (Com {[LIT_CHARS git]} {[LIT_CHARS for-each-ref]} {[LIT_CHARS --format] [LIT_DBRACKET_LIKE "="] [SQ ]} {[VarSub curr_branch]})]} ) ) ) ) (List (= scope= flags=0 words=[] bindings=[('repo', {[VarSub 1]})]) (Com {[LIT_CHARS shift]} ) (= scope= flags=0 words=[] bindings=[('ref', {[VarSub 1]})]) (Case to_match={[DQ [VarSub ref]]}, pat_word_list=[[{[LIT_OTHER "+"] [LIT_OTHER "*"]}]] (= scope= flags=0 words=[] bindings=[('ref', {[ComSub (Com {[LIT_CHARS expr]} {[DQ [LIT_CHARS z][VarSub ref]]} {[LIT_OTHER ":"]} {[SQ ]})]})]) ) (AndOr OP_OR_IF (Com {[LIT_CHARS expr]} {[DQ [LIT_CHARS z][VarSub ref]]} {[LIT_OTHER ":"]} {[SQ ]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), > ) (= scope= flags=0 words=[] bindings=[('ref', {[DQ [VarSub ref][LIT_CHARS ":"]]})]) ) (= scope= flags=0 words=[] bindings=[('remote', {[ComSub (Com {[LIT_CHARS expr]} {[DQ [LIT_CHARS z][VarSub ref]]} {[LIT_OTHER ":"]} {[SQ ]})]})]) (Case to_match={[DQ [VarSub remote]]}, pat_word_list=[[{[SQ ]}, {[LIT_CHARS HEAD]}], [{[LIT_CHARS heads/] [LIT_OTHER "*"]}], [{[LIT_CHARS refs/heads/] [LIT_OTHER "*"]}], [{[LIT_CHARS refs/] [LIT_OTHER "*"]}, {[LIT_CHARS tags/] [LIT_OTHER "*"]}, {[LIT_CHARS remotes/] [LIT_OTHER "*"]}]] (= scope= flags=0 words=[] bindings=[('remote', {[LIT_CHARS HEAD]})]) (= scope= flags=0 words=[] bindings=[('remote', {[VarSub remote transform_ops=[VS_UNARY_POUND {[LIT_CHARS heads] [LIT_SLASH /]}]]})]) (= scope= flags=0 words=[] bindings=[('remote', {[VarSub remote transform_ops=[VS_UNARY_POUND {[LIT_CHARS refs] [LIT_SLASH /] [LIT_CHARS heads] [LIT_SLASH /]}]]})]) (= scope= flags=0 words=[] bindings=[('remote', {[SQ ]})]) ) (AndOr OP_AND_IF (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_CHARS -n]} {[DQ [VarSub remote]]} {[LIT_DBRACKET_LIKE "]"]} ) (Case to_match={[DQ [VarSub repo]]}, pat_word_list=[[{[LIT_CHARS .]}], [{[LIT_OTHER "*"]}]] (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS refs/heads/][VarSub remote]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS refs/remotes/][VarSub repo][LIT_CHARS /][VarSub remote]]} ) ) ) ) ) ) (FunctionDef error_on_missing_default_upstream [] (List (= scope= flags=0 words=[] bindings=[('cmd', {[DQ [VarSub 1]]})]) (= scope= flags=0 words=[] bindings=[('op_type', {[DQ [VarSub 2]]})]) (= scope= flags=0 words=[] bindings=[('op_prep', {[DQ [VarSub 3]]})]) (= scope= flags=0 words=[] bindings=[('example', {[DQ [VarSub 4]]})]) (= scope= flags=0 words=[] bindings=[('branch_name', {[ComSub (Com {[LIT_CHARS git]} {[LIT_CHARS symbolic-ref]} {[LIT_CHARS -q]} {[LIT_CHARS HEAD]})]})]) (= scope= flags=0 words=[] bindings=[('remote', {[DQ [LIT_CHARS ""]]})]) (If (Com {[LIT_CHARS test]} {[ComSub (Pipeline (Com {[LIT_CHARS git]} {[LIT_CHARS remote]}) (Com {[LIT_CHARS wc]} {[LIT_CHARS -l]}) )]} {[LIT_DBRACKET_LIKE "="]} {[LIT_CHARS 1]} ) (= scope= flags=0 words=[] bindings=[('remote', {[ComSub (Com {[LIT_CHARS git]} {[LIT_CHARS remote]})]})]) ) (If (Com {[LIT_CHARS test]} {[LIT_CHARS -z]} {[DQ [VarSub branch_name]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "You are not currently on a branch. Please specify which\n"][LIT_CHARS "branch you want to "][VarSub op_type][LIT_CHARS " "][VarSub op_prep][LIT_CHARS ". See git-"][VarSub cmd][LIT_CHARS "(1) for details.\n"][LIT_CHARS "\n"][LIT_CHARS " "][VarSub example][LIT_CHARS "\n"]]} ) (ElseTrue) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "There is no tracking information for the current branch.\n"][LIT_CHARS "Please specify which branch you want to "][VarSub op_type][LIT_CHARS " "][VarSub op_prep][LIT_CHARS ".\n"][LIT_CHARS "See git-"][VarSub cmd][LIT_CHARS "(1) for details\n"][LIT_CHARS "\n"][LIT_CHARS " "][VarSub example][LIT_CHARS "\n"][LIT_CHARS "\n"][LIT_CHARS "If you wish to set tracking information for this branch you can do so with:\n"][LIT_CHARS "\n"][LIT_CHARS " git branch --set-upstream "][VarSub branch_name transform_ops=[VS_UNARY_POUND {[LIT_CHARS refs] [LIT_SLASH /] [LIT_CHARS heads] [LIT_SLASH /]}]][LIT_CHARS " "][VarSub remote][LIT_CHARS "/\n"]]} ) ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) )