Git 1.7.0.7
[git/mingw/4msysgit/kblees.git] / t / t6015-rev-list-show-all-parents.sh
blob8b146fb432bc7a8dee8eeeb43f2b6b946d51190b
1 #!/bin/sh
3 test_description='--show-all --parents does not rewrite TREESAME commits'
5 . ./test-lib.sh
7 test_expect_success 'set up --show-all --parents test' '
8 test_commit one foo.txt &&
9 commit1=`git rev-list -1 HEAD` &&
10 test_commit two bar.txt &&
11 commit2=`git rev-list -1 HEAD` &&
12 test_commit three foo.txt &&
13 commit3=`git rev-list -1 HEAD`
16 test_expect_success '--parents rewrites TREESAME parents correctly' '
17 echo $commit3 $commit1 > expected &&
18 echo $commit1 >> expected &&
19 git rev-list --parents HEAD -- foo.txt > actual &&
20 test_cmp expected actual
23 test_expect_success '--parents --show-all does not rewrites TREESAME parents' '
24 echo $commit3 $commit2 > expected &&
25 echo $commit2 $commit1 >> expected &&
26 echo $commit1 >> expected &&
27 git rev-list --parents --show-all HEAD -- foo.txt > actual &&
28 test_cmp expected actual
31 test_done