summaryrefslogtreecommitdiff
path: root/t/t5520-pull.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-12-09 21:37:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-12-09 21:37:01 (GMT)
commit1ee740e66975adbab080301ebd364e253be3d513 (patch)
tree672932e73881b55204ec237b9047c8532d891a61 /t/t5520-pull.sh
parentef87690b27fd1facdc8cc48f6789a930939303a3 (diff)
parent6b37dff17f176d7e87efa93b4cf521dd725de247 (diff)
downloadgit-1ee740e66975adbab080301ebd364e253be3d513.zip
git-1ee740e66975adbab080301ebd364e253be3d513.tar.gz
git-1ee740e66975adbab080301ebd364e253be3d513.tar.bz2
Merge branch 'ab/pull-rebase-config'
* ab/pull-rebase-config: pull: introduce a pull.rebase option to enable --rebase
Diffstat (limited to 't/t5520-pull.sh')
-rwxr-xr-xt/t5520-pull.sh23
1 files changed, 21 insertions, 2 deletions
diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh
index 0e5eb67..35304b4 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 . &&