(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <'test <branch>@{push} syntax'>)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (FuncDef name: resolve body: (BraceGroup children: [ (AndOr ops: [Op_DAmp Op_DAmp] children: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Number '$2'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(expect)} spids:[28])] ) (SimpleCommand words: [{(git)} {(rev-parse)} {(--symbolic-full-name)} {(DQ ($ VSub_Number '$1'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(actual)} spids:[44])] ) (C {(test_cmp)} {(expect)} {(actual)}) ] ) ] spids: [19] ) spids: [14 18] ) (C {(test_expect_success)} {(SQ <setup>)} { (SQ <'\n'> <'\tgit init --bare parent.git &&\n'> <'\tgit init --bare other.git &&\n'> <'\tgit remote add origin parent.git &&\n'> <'\tgit remote add other other.git &&\n'> <'\ttest_commit base &&\n'> <'\tgit push origin HEAD &&\n'> <'\tgit branch --set-upstream-to=origin/master master &&\n'> <'\tgit branch --track topic origin/master &&\n'> <'\tgit push origin topic &&\n'> <'\tgit push other topic\n'> ) } ) (C {(test_expect_success)} {(SQ <'@{push} with default=nothing'>)} { (SQ <'\n'> <'\ttest_config push.default nothing &&\n'> <'\ttest_must_fail git rev-parse master@{push}\n'> ) } ) (C {(test_expect_success)} {(SQ <'@{push} with default=simple'>)} { (SQ <'\n'> <'\ttest_config push.default simple &&\n'> <'\tresolve master@{push} refs/remotes/origin/master\n'> ) } ) (C {(test_expect_success)} {(SQ <'triangular @{push} fails with default=simple'>)} { (SQ <'\n'> <'\ttest_config push.default simple &&\n'> <'\ttest_must_fail git rev-parse topic@{push}\n'> ) } ) (C {(test_expect_success)} {(SQ <'@{push} with default=current'>)} { (SQ <'\n'> <'\ttest_config push.default current &&\n'> <'\tresolve topic@{push} refs/remotes/origin/topic\n'> ) } ) (C {(test_expect_success)} {(SQ <'@{push} with default=matching'>)} { (SQ <'\n'> <'\ttest_config push.default matching &&\n'> <'\tresolve topic@{push} refs/remotes/origin/topic\n'> ) } ) (C {(test_expect_success)} {(SQ <'@{push} with pushremote defined'>)} { (SQ <'\n'> <'\ttest_config push.default current &&\n'> <'\ttest_config branch.topic.pushremote other &&\n'> <'\tresolve topic@{push} refs/remotes/other/topic\n'> ) } ) (C {(test_expect_success)} {(SQ <'@{push} with push refspecs'>)} { (SQ <'\n'> <'\ttest_config push.default nothing &&\n'> <'\ttest_config remote.origin.push refs/heads/*:refs/heads/magic/* &&\n'> <'\tgit push &&\n'> <'\tresolve topic@{push} refs/remotes/origin/magic/topic\n'> ) } ) (C {(test_done)}) ] )