Add is_absolute_path() and make_absolute_path()
[git/platforms.git] / t / t6007-rev-list-cherry-pick-file.sh
blob3faeae6c01688069220e6dc5b200fbb1d04a05fd
1 #!/bin/sh
3 test_description='test git rev-list --cherry-pick -- file'
5 . ./test-lib.sh
7 # A---B
8 # \
9 # \
10 # C
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 '
16 echo Hallo > foo &&
17 git add foo &&
18 test_tick &&
19 git commit -m "A" &&
20 git tag A &&
21 git checkout -b branch &&
22 echo Bello > foo &&
23 echo Cello > bar &&
24 git add foo bar &&
25 test_tick &&
26 git commit -m "C" &&
27 git tag C &&
28 git checkout master &&
29 git checkout branch foo &&
30 test_tick &&
31 git commit -m "B" &&
32 git tag B
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_done