aboutsummaryrefslogtreecommitdiff
path: root/t/t5520-pull.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t5520-pull.sh')
-rwxr-xr-xt/t5520-pull.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh
index 872d765b5..90728e009 100755
--- a/t/t5520-pull.sh
+++ b/t/t5520-pull.sh
@@ -217,6 +217,15 @@ test_expect_success '--rebase' '
test "$(git rev-parse HEAD^)" = "$(git rev-parse copy)" &&
test new = "$(git show HEAD:file2)"
'
+
+test_expect_success '--rebase fails with multiple branches' '
+ git reset --hard before-rebase &&
+ test_must_fail git pull --rebase . copy master 2>err &&
+ test "$(git rev-parse HEAD)" = "$(git rev-parse before-rebase)" &&
+ test_i18ngrep "Cannot rebase onto multiple branches" err &&
+ test modified = "$(git show HEAD:file)"
+'
+
test_expect_success 'pull.rebase' '
git reset --hard before-rebase &&
test_config pull.rebase true &&