diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-12-02 23:00:43 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-12-02 23:00:43 -0800 |
commit | 0ebd5d7186237663a642397214232e5fe2fba21d (patch) | |
tree | c94682d4abf341bdc6df2785b73faa6e796ff045 /t | |
parent | 5b0d61637c21d80bcc781aa135ed1959326713bb (diff) | |
parent | cd67e4d46b122b161f2ad7d943e4ae7aa8df6cf5 (diff) | |
download | git-0ebd5d7186237663a642397214232e5fe2fba21d.tar.gz |
Merge branch 'js/pull-rebase'
* js/pull-rebase:
Teach 'git pull' about --rebase
Diffstat (limited to 't')
-rwxr-xr-x | t/t5520-pull.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh index 93eaf2c154..52b3a0c6dd 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 |