3 test_description='test git rev-list --cherry-pick -- file'
12 # B changes a file foo.c, adding a line of text. C changes foo.c as
13 # well as bar.c, but the change in foo.c was identical to change B.
15 test_expect_success setup '
21 git checkout -b branch &&
28 git checkout master &&
29 git checkout branch foo &&
35 test_expect_success '--cherry-pick foo comes up empty' '
36 test -z "$(git rev-list --left-right --cherry-pick B...C -- foo)"
39 test_expect_success '--cherry-pick bar does not come up empty' '
40 ! test -z "$(git rev-list --left-right --cherry-pick B...C -- bar)"
43 test_expect_success '--cherry-pick with independent, but identical branches' '
44 git symbolic-ref HEAD refs/heads/independent &&
49 git commit -m "independent" &&
52 git commit -m "independent, too" foo &&
53 test -z "$(git rev-list --left-right --cherry-pick \
54 HEAD...master -- foo)"