aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-12-02 23:00:43 -0800
committerJunio C Hamano <gitster@pobox.com>2007-12-02 23:00:43 -0800
commit0ebd5d7186237663a642397214232e5fe2fba21d (patch)
treec94682d4abf341bdc6df2785b73faa6e796ff045 /t
parent5b0d61637c21d80bcc781aa135ed1959326713bb (diff)
parentcd67e4d46b122b161f2ad7d943e4ae7aa8df6cf5 (diff)
downloadgit-0ebd5d7186237663a642397214232e5fe2fba21d.tar.gz
git-0ebd5d7186237663a642397214232e5fe2fba21d.tar.xz
Merge branch 'js/pull-rebase'
* js/pull-rebase: Teach 'git pull' about --rebase
Diffstat (limited to 't')
-rwxr-xr-xt/t5520-pull.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh
index 93eaf2c15..52b3a0c6d 100755
--- a/t/t5520-pull.sh
+++ b/t/t5520-pull.sh
@@ -53,4 +53,26 @@ test_expect_success 'the default remote . should not break explicit pull' '
test `cat file` = modified
'
+test_expect_success '--rebase' '
+ git branch to-rebase &&
+ echo modified again > file &&
+ git commit -m file file &&
+ git checkout to-rebase &&
+ echo new > file2 &&
+ git add file2 &&
+ git commit -m "new file" &&
+ git tag before-rebase &&
+ git pull --rebase . 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 pull . copy &&
+ test $(git rev-parse HEAD^) = $(git rev-parse copy) &&
+ test new = $(git show HEAD:file2)
+'
+
test_done