(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description spids:[4]) 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:<Redir_Great '>'> fd:16777215 arg_word:{(expect)}) (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 92 stdin_parts: [('<tags/B\n') ('>tags/C\n')] ) ] ) (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:<Redir_Great '>'> fd:16777215 arg_word:{(expect)}) (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 144 stdin_parts: [('>tags/C\n')] ) ] ) (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:<Redir_Great '>'> fd:16777215 arg_word:{(expect)}) (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 187 stdin_parts: [('<tags/F\n') ('>tags/E\n')] ) ] ) (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:<Redir_Great '>'> fd:16777215 arg_word:{(expect)}) (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 217 stdin_parts: [('+tags/F\n') ('=tags/D\n') ('+tags/E\n') ('=tags/C\n')] ) ] ) (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:<Redir_Great '>'> fd:16777215 arg_word:{(expect)}) (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 247 stdin_parts: [('<tags/F\n') ('=tags/D\n') ('>tags/E\n') ('=tags/C\n')] ) ] ) (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:<Redir_Great '>'> fd:16777215 arg_word:{(expect)}) (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 274 stdin_parts: [('tags/E\n')] ) ] ) (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:<Redir_Great '>'> fd:16777215 arg_word:{(expect)}) (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 317 stdin_parts: [('+tags/E\n') ('=tags/C\n')] ) ] ) (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:<Redir_Great '>'> fd:16777215 arg_word:{(expect)}) (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 344 stdin_parts: [('1\t1\n')] ) ] ) (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:<Redir_Great '>'> fd:16777215 arg_word:{(expect)}) (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 369 stdin_parts: [('2\t2\n')] ) ] ) (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:<Redir_Great '>'> fd:16777215 arg_word:{(expect)}) (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 394 stdin_parts: [('1\t1\t2\n')] ) ] ) (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:<Redir_Great '>'> fd:16777215 arg_word:{(expect)}) (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 441 stdin_parts: [('1\t2\n')] ) ] ) (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 ops: [Op_DAmp Op_DAmp Op_DAmp] children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha1 spids:[470]) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [(C {(git)} {(rev-parse)} {(DQ ($ VSub_Number '$1'))})] ) left_token: <Left_CommandSub '$('> spids: [472 480] ) ) } spids: [470] ) ] spids: [470] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:remainder spids:[486]) op: Equal rhs: { (BracedVarSub token: <VSub_Name sha1> suffix_op: (StringUnary op_id:VOp1_Pound arg_word:{('??')}) spids: [487 491] ) } spids: [486] ) ] spids: [486] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:firsttwo spids:[496]) op: Equal rhs: { (BracedVarSub token: <VSub_Name sha1> suffix_op: (StringUnary op_id: VOp1_Percent arg_word: {($ VSub_Name '$remainder')} ) spids: [497 501] ) } spids: [496] ) ] spids: [496] ) (C {(rm)} {(.git/objects/) ($ VSub_Name '$firsttwo') (/) ($ VSub_Name '$remainder')}) ] ) ] spids: [467] ) spids: [462 466] ) (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)}) ] )