diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-12-09 13:37:01 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-12-09 13:37:01 -0800 |
commit | 1ee740e66975adbab080301ebd364e253be3d513 (patch) | |
tree | 672932e73881b55204ec237b9047c8532d891a61 /t | |
parent | ef87690b27fd1facdc8cc48f6789a930939303a3 (diff) | |
parent | 6b37dff17f176d7e87efa93b4cf521dd725de247 (diff) | |
download | git-1ee740e66975adbab080301ebd364e253be3d513.tar.gz |
Merge branch 'ab/pull-rebase-config'
* ab/pull-rebase-config:
pull: introduce a pull.rebase option to enable --rebase
Diffstat (limited to 't')
-rwxr-xr-x | t/t5520-pull.sh | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh index 0e5eb678ce..35304b41e9 100755 --- a/t/t5520-pull.sh +++ b/t/t5520-pull.sh @@ -94,16 +94,35 @@ test_expect_success '--rebase' ' test $(git rev-parse HEAD^) = $(git rev-parse copy) && test new = $(git show HEAD:file2) ' +test_expect_success 'pull.rebase' ' + git reset --hard before-rebase && + git config --bool pull.rebase true && + test_when_finished "git config --unset pull.rebase" && + git pull . copy && + test $(git rev-parse HEAD^) = $(git rev-parse copy) && + test new = $(git show HEAD:file2) +' test_expect_success 'branch.to-rebase.rebase' ' git reset --hard before-rebase && - git config branch.to-rebase.rebase 1 && + git config --bool branch.to-rebase.rebase true && + test_when_finished "git config --unset branch.to-rebase.rebase" && git pull . copy && - git config branch.to-rebase.rebase 0 && test $(git rev-parse HEAD^) = $(git rev-parse copy) && test new = $(git show HEAD:file2) ' +test_expect_success 'branch.to-rebase.rebase should override pull.rebase' ' + git reset --hard before-rebase && + git config --bool pull.rebase true && + test_when_finished "git config --unset pull.rebase" && + git config --bool branch.to-rebase.rebase false && + test_when_finished "git config --unset branch.to-rebase.rebase" && + git pull . copy && + test $(git rev-parse HEAD^) != $(git rev-parse copy) && + test new = $(git show HEAD:file2) +' + test_expect_success '--rebase with rebased upstream' ' git remote add -f me . && |