diff options
Diffstat (limited to 't')
-rwxr-xr-x | t/t5520-pull.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh index 872d765b5c..90728e0094 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 && |