3 test_description
='git rebase - test patch id computation'
20 test_expect_success
'setup' '
21 git commit --allow-empty -m initial &&
25 test_expect_success
'setup: 500 lines' '
26 rm -f .gitattributes &&
27 git checkout -q -f master &&
28 git reset --hard root &&
31 git commit -q -m initial &&
32 git branch -f other &&
36 git commit -q -m "change big file" &&
38 git checkout -q other &&
41 git commit -q -m "add small file" &&
43 git cherry-pick master >/dev/null 2>&1
46 test_expect_success
'setup attributes' '
47 echo "file binary" >.gitattributes
50 test_expect_success
'detect upstream patch' '
51 git checkout -q master &&
54 git commit -q -m "change big file again" &&
55 git checkout -q other^{} &&
57 git rev-list master...HEAD~ >revs &&
58 test_must_be_empty revs
61 test_expect_success
'do not drop patch' '
62 git branch -f squashed master &&
63 git checkout -q -f squashed &&
64 git reset -q --soft HEAD~2 &&
65 git commit -q -m squashed &&
66 git checkout -q other^{} &&
67 test_must_fail git rebase squashed &&