3 test_description
='git rebase - test patch id computation'
31 /usr
/bin
/time "$@" >/dev
/null
34 test_expect_success
'setup' '
35 git commit --allow-empty -m initial &&
42 test_expect_success
$pr "setup: $nlines lines" "
43 rm -f .gitattributes &&
44 git checkout -q -f master &&
45 git reset --hard root &&
46 count $nlines >file &&
48 git commit -q -m initial &&
49 git branch -f other &&
53 git commit -q -m 'change big file' &&
55 git checkout -q other &&
58 git commit -q -m 'add small file' &&
60 git cherry-pick master >/dev/null 2>&1
64 run git diff master^\!
67 test_expect_success
$pr 'setup attributes' "
68 echo 'file binary' >.gitattributes
72 run git format-patch --stdout master &&
73 run git format-patch --stdout --ignore-if-in-upstream master
76 test_expect_success
$pr 'detect upstream patch' '
77 git checkout -q master &&
80 git commit -q -m "change big file again" &&
81 git checkout -q other^{} &&
83 git rev-list master...HEAD~ >revs &&
84 test_must_be_empty revs
87 test_expect_success
$pr 'do not drop patch' '
88 git branch -f squashed master &&
89 git checkout -q -f squashed &&
90 git reset -q --soft HEAD~2 &&
91 git commit -q -m squashed &&
92 git checkout -q other^{} &&
93 test_must_fail git rebase squashed &&
94 rm -rf .git/rebase-apply
99 do_tests
50000 EXPENSIVE