(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <"test git rev-list --cherry-pick -- file">)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (C {(test_expect_success)} {(setup)} { (SQ <"\n"> <"\techo Hallo > foo &&\n"> <"\tgit add foo &&\n"> <"\ttest_tick &&\n"> <"\tgit commit -m \"A\" &&\n"> <"\tgit tag A &&\n"> <"\tgit checkout -b branch &&\n"> <"\techo Bello > foo &&\n"> <"\techo Cello > bar &&\n"> <"\tgit add foo bar &&\n"> <"\ttest_tick &&\n"> <"\tgit commit -m \"C\" &&\n"> <"\tgit tag C &&\n"> <"\techo Dello > bar &&\n"> <"\tgit add bar &&\n"> <"\ttest_tick &&\n"> <"\tgit commit -m \"E\" &&\n"> <"\tgit tag E &&\n"> <"\tgit checkout master &&\n"> <"\tgit checkout branch foo &&\n"> <"\ttest_tick &&\n"> <"\tgit commit -m \"B\" &&\n"> <"\tgit tag B &&\n"> <"\techo Cello > bar &&\n"> <"\tgit add bar &&\n"> <"\ttest_tick &&\n"> <"\tgit commit -m \"D\" &&\n"> <"\tgit tag D &&\n"> <"\techo Nello > bar &&\n"> <"\tgit add bar &&\n"> <"\ttest_tick &&\n"> <"\tgit commit -m \"F\" &&\n"> <"\tgit tag F\n"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[83]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ("<tags/B\n") (">tags/C\n"))} do_expansion: True here_end: EOF was_filled: True spids: [86] ) ] ) (C {(test_expect_success)} {(SQ <--left-right>)} { (SQ <"\n"> <"\tgit rev-list --left-right B...C > actual &&\n"> <"\tgit name-rev --stdin --name-only --refs=\"*tags/*\" \\\n"> <"\t\t< actual > actual.named &&\n"> <"\ttest_cmp actual.named expect\n"> ) } ) (C {(test_expect_success)} {(SQ <--count>)} {(SQ <"\n"> <"\tgit rev-list --count B...C > actual &&\n"> <"\ttest \"$(cat actual)\" = 2\n">)} ) (C {(test_expect_success)} {(SQ <"--cherry-pick foo comes up empty">)} {(SQ <"\n"> <"\ttest -z \"$(git rev-list --left-right --cherry-pick B...C -- foo)\"\n">)} ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[134]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ (">tags/C\n"))} do_expansion: True here_end: EOF was_filled: True spids: [137] ) ] ) (C {(test_expect_success)} {(SQ <"--cherry-pick bar does not come up empty">)} { (SQ <"\n"> <"\tgit rev-list --left-right --cherry-pick B...C -- bar > actual &&\n"> <"\tgit name-rev --stdin --name-only --refs=\"*tags/*\" \\\n"> <"\t\t< actual > actual.named &&\n"> <"\ttest_cmp actual.named expect\n"> ) } ) (C {(test_expect_success)} {(SQ <"bar does not come up empty">)} { (SQ <"\n"> <"\tgit rev-list --left-right B...C -- bar > actual &&\n"> <"\tgit name-rev --stdin --name-only --refs=\"*tags/*\" \\\n"> <"\t\t< actual > actual.named &&\n"> <"\ttest_cmp actual.named expect\n"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[174]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ("<tags/F\n") (">tags/E\n"))} do_expansion: True here_end: EOF was_filled: True spids: [177] ) ] ) (C {(test_expect_success)} {(SQ <"--cherry-pick bar does not come up empty (II)">)} { (SQ <"\n"> <"\tgit rev-list --left-right --cherry-pick F...E -- bar > actual &&\n"> <"\tgit name-rev --stdin --name-only --refs=\"*tags/*\" \\\n"> <"\t\t< actual > actual.named &&\n"> <"\ttest_cmp actual.named expect\n"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[200]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ("+tags/F\n") ("=tags/D\n") ("+tags/E\n") ("=tags/C\n"))} do_expansion: True here_end: EOF was_filled: True spids: [203] ) ] ) (C {(test_expect_success)} {(SQ <--cherry-mark>)} { (SQ <"\n"> <"\tgit rev-list --cherry-mark F...E -- bar > actual &&\n"> <"\tgit name-rev --stdin --name-only --refs=\"*tags/*\" \\\n"> <"\t\t< actual > actual.named &&\n"> <"\ttest_cmp actual.named expect\n"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[228]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ("<tags/F\n") ("=tags/D\n") (">tags/E\n") ("=tags/C\n"))} do_expansion: True here_end: EOF was_filled: True spids: [231] ) ] ) (C {(test_expect_success)} {(SQ <"--cherry-mark --left-right">)} { (SQ <"\n"> <"\tgit rev-list --cherry-mark --left-right F...E -- bar > actual &&\n"> <"\tgit name-rev --stdin --name-only --refs=\"*tags/*\" \\\n"> <"\t\t< actual > actual.named &&\n"> <"\ttest_cmp actual.named expect\n"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[256]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ("tags/E\n"))} do_expansion: True here_end: EOF was_filled: True spids: [259] ) ] ) (C {(test_expect_success)} {(SQ <"--cherry-pick --right-only">)} { (SQ <"\n"> <"\tgit rev-list --cherry-pick --right-only F...E -- bar > actual &&\n"> <"\tgit name-rev --stdin --name-only --refs=\"*tags/*\" \\\n"> <"\t\t< actual > actual.named &&\n"> <"\ttest_cmp actual.named expect\n"> ) } ) (C {(test_expect_success)} {(SQ <"--cherry-pick --left-only">)} { (SQ <"\n"> <"\tgit rev-list --cherry-pick --left-only E...F -- bar > actual &&\n"> <"\tgit name-rev --stdin --name-only --refs=\"*tags/*\" \\\n"> <"\t\t< actual > actual.named &&\n"> <"\ttest_cmp actual.named expect\n"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[296]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ("+tags/E\n") ("=tags/C\n"))} do_expansion: True here_end: EOF was_filled: True spids: [299] ) ] ) (C {(test_expect_success)} {(SQ <--cherry>)} { (SQ <"\n"> <"\tgit rev-list --cherry F...E -- bar > actual &&\n"> <"\tgit name-rev --stdin --name-only --refs=\"*tags/*\" \\\n"> <"\t\t< actual > actual.named &&\n"> <"\ttest_cmp actual.named expect\n"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[322]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ("1\t1\n"))} do_expansion: True here_end: EOF was_filled: True spids: [325] ) ] ) (C {(test_expect_success)} {(SQ <"--cherry --count">)} { (SQ <"\n"> <"\tgit rev-list --cherry --count F...E -- bar > actual &&\n"> <"\ttest_cmp actual expect\n"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[345]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ("2\t2\n"))} do_expansion: True here_end: EOF was_filled: True spids: [348] ) ] ) (C {(test_expect_success)} {(SQ <"--cherry-mark --count">)} { (SQ <"\n"> <"\tgit rev-list --cherry-mark --count F...E -- bar > actual &&\n"> <"\ttest_cmp actual expect\n"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[368]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ("1\t1\t2\n"))} do_expansion: True here_end: EOF was_filled: True spids: [371] ) ] ) (C {(test_expect_success)} {(SQ <"--cherry-mark --left-right --count">)} { (SQ <"\n"> <"\tgit rev-list --cherry-mark --left-right --count F...E -- bar > actual &&\n"> <"\ttest_cmp actual expect\n"> ) } ) (C {(test_expect_success)} {(SQ <"--cherry-pick with independent, but identical branches">)} { (SQ <"\n"> <"\tgit symbolic-ref HEAD refs/heads/independent &&\n"> <"\trm .git/index &&\n"> <"\techo Hallo > foo &&\n"> <"\tgit add foo &&\n"> <"\ttest_tick &&\n"> <"\tgit commit -m \"independent\" &&\n"> <"\techo Bello > foo &&\n"> <"\ttest_tick &&\n"> <"\tgit commit -m \"independent, too\" foo &&\n"> <"\ttest -z \"$(git rev-list --left-right --cherry-pick \\\n"> <"\t\tHEAD...master -- foo)\"\n"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[413]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ("1\t2\n"))} do_expansion: True here_end: EOF was_filled: True spids: [416] ) ] ) (C {(test_expect_success)} {(SQ <"--count --left-right">)} { (SQ <"\n"> <"\tgit rev-list --count --left-right C...D > actual &&\n"> <"\ttest_cmp expect actual\n"> ) } ) (FuncDef name: remove_loose_object body: (BraceGroup children: [ (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha1) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [(C {(git)} {(rev-parse)} {(DQ ($ VSub_Number "$1"))})] ) left_token: <Left_CommandSub "$("> spids: [450 458] ) ) } spids: [448] ) ] spids: [448] ) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:remainder) op: Equal rhs: { (BracedVarSub token: <VSub_Name sha1> suffix_op: (StringUnary op_id:VOp1_Pound arg_word:{("??")}) spids: [465 469] ) } spids: [464] ) ] spids: [464] ) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:firsttwo) op: Equal rhs: { (BracedVarSub token: <VSub_Name sha1> suffix_op: (StringUnary op_id: VOp1_Percent arg_word: {($ VSub_Name "$remainder")} ) spids: [475 479] ) } spids: [474] ) ] spids: [474] ) (C {(rm)} {(.git/objects/) ($ VSub_Name "$firsttwo") (/) ($ VSub_Name "$remainder")} ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] spids: [445] ) spids: [440 444] ) (C {(test_expect_success)} {(SQ <"--cherry-pick avoids looking at full diffs">)} { (SQ <"\n"> <"\tgit checkout -b shy-diff &&\n"> <"\ttest_commit dont-look-at-me &&\n"> <"\techo Hello >dont-look-at-me.t &&\n"> <"\ttest_tick &&\n"> <"\tgit commit -m tip dont-look-at-me.t &&\n"> <"\tgit checkout -b mainline HEAD^ &&\n"> <"\ttest_commit to-cherry-pick &&\n"> <"\tremove_loose_object shy-diff^:dont-look-at-me.t &&\n"> <"\tgit rev-list --cherry-pick ...shy-diff\n"> ) } ) (C {(test_done)}) ] )