t5520-pull: Test for rebased upstream + fetch + pull --rebase
If your upstream has rebased you can do: git pull --rebase but only if you haven't fetch before. Mark this case as test_expect_failure, in a later patch it will be changed to test_expect_success. Signed-off-by: Santi Béjar <santi@agolina.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Santi Béjar committed
Jul 16, 2009 at 02:09 UTC
a418441b4ea2ab69a17636c3020a29394d4c6562
1 file changed
+14
t/t5520-pull.sh
+14
@@ -117,6 +117,20 @@ test_expect_success '--rebase with rebased default upstream' '
117
118
'
119
120
+test_expect_failure 'rebased upstream + fetch + pull --rebase' '
121
+
122
+ git update-ref refs/remotes/me/copy copy-orig &&
123
+ git reset --hard to-rebase-orig &&
124
+ git checkout --track -b to-rebase3 me/copy &&
125
+ git reset --hard to-rebase-orig &&
126
+ git fetch &&
127
+ test_must_fail git pull --rebase &&
128
+ git rebase --abort &&
129
+ test "conflicting modification" = "$(cat file)" &&
130
+ test file = "$(cat file2)"
131
+
132
+'
133
+
134
test_expect_success 'pull --rebase dies early with dirty working directory' '
135
136
git checkout to-rebase &&