(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: { (SQ (Token id: Id.Lit_Chars val: 'git cherry should detect patches integrated upstream\n' span_id: 15 ) (Token id:Id.Lit_Chars val:'\n' span_id:16) (Token id: Id.Lit_Chars val: 'This test cherry-picks one local change of two into master branch, and\n' span_id: 17 ) (Token id: Id.Lit_Chars val: 'checks that git cherry only returns the second patch in the local branch\n' span_id: 18 ) ) } spids: [13] ) ] ) (C {(.)} {(./test-lib.sh)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GIT_AUTHOR_EMAIL) op: assign_op.Equal rhs: {(bogus_email_address)} spids: [26] ) ] ) (C {(export)} {(GIT_AUTHOR_EMAIL)}) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'prepare repository with topic branch, and check cherry finds the 2 patches from there' span_id: 39 ) ) } { (SQ (Token id:Id.Lit_Chars val:'echo First > A &&\n' span_id:45) (Token id:Id.Lit_Chars val:' git update-index --add A &&\n' span_id:46) (Token id:Id.Lit_Chars val:' test_tick &&\n' span_id:47) (Token id:Id.Lit_Chars val:' git commit -m "Add A." &&\n' span_id:48) (Token id:Id.Lit_Chars val:'\n' span_id:49) (Token id: Id.Lit_Chars val: ' git checkout -b my-topic-branch &&\n' span_id: 50 ) (Token id:Id.Lit_Chars val:'\n' span_id:51) (Token id:Id.Lit_Chars val:' echo Second > B &&\n' span_id:52) (Token id:Id.Lit_Chars val:' git update-index --add B &&\n' span_id:53) (Token id:Id.Lit_Chars val:' test_tick &&\n' span_id:54) (Token id:Id.Lit_Chars val:' git commit -m "Add B." &&\n' span_id:55) (Token id:Id.Lit_Chars val:'\n' span_id:56) (Token id:Id.Lit_Chars val:' echo AnotherSecond > C &&\n' span_id:57) (Token id:Id.Lit_Chars val:' git update-index --add C &&\n' span_id:58) (Token id:Id.Lit_Chars val:' test_tick &&\n' span_id:59) (Token id:Id.Lit_Chars val:' git commit -m "Add C." &&\n' span_id:60) (Token id:Id.Lit_Chars val:'\n' span_id:61) (Token id:Id.Lit_Chars val:' git checkout -f master &&\n' span_id:62) (Token id:Id.Lit_Chars val:' rm -f B C &&\n' span_id:63) (Token id:Id.Lit_Chars val:'\n' span_id:64) (Token id:Id.Lit_Chars val:' echo Third >> A &&\n' span_id:65) (Token id:Id.Lit_Chars val:' git update-index A &&\n' span_id:66) (Token id:Id.Lit_Chars val:' test_tick &&\n' span_id:67) (Token id:Id.Lit_Chars val:' git commit -m "Modify A." &&\n' span_id:68) (Token id:Id.Lit_Chars val:'\n' span_id:69) (Token id: Id.Lit_Chars val: ' expr "$(echo $(git cherry master my-topic-branch) )" : "+ [^ ]* + .*"\n' span_id: 70 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'check that cherry with limit returns only the top patch' span_id: 79 ) ) } { (SQ (Token id: Id.Lit_Chars val: 'expr "$(echo $(git cherry master my-topic-branch my-topic-branch^1) )" : "+ [^ ]*"\n' span_id: 84 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'cherry-pick one of the 2 patches, and check cherry recognized one and only one as new' span_id: 93 ) ) } { (SQ (Token id:Id.Lit_Chars val:'git cherry-pick my-topic-branch^0 &&\n' span_id:99) (Token id: Id.Lit_Chars val: ' echo $(git cherry master my-topic-branch) &&\n' span_id: 100 ) (Token id: Id.Lit_Chars val: ' expr "$(echo $(git cherry master my-topic-branch) )" : "+ [^ ]* - .*"\n' span_id: 101 ) ) } ) (C {(test_done)}) ] )