diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-04-29 12:59:08 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-04-29 12:59:08 -0700 |
commit | 175008d45474ff78ca9e3dcf038df359a97b4d92 (patch) | |
tree | 7dc4add353d353d40a49a1c440d186e4c134cd07 /t/t5521-pull-options.sh | |
parent | Merge branch 'jk/push-client-deadlock-fix' (diff) | |
parent | pull: pass --allow-unrelated-histories to "git merge" (diff) | |
download | tgif-175008d45474ff78ca9e3dcf038df359a97b4d92.tar.xz |
Merge branch 'jc/merge-refuse-new-root'
"git pull" has been taught to pass --allow-unrelated-histories
option to underlying "git merge".
* jc/merge-refuse-new-root:
pull: pass --allow-unrelated-histories to "git merge"
t3033: avoid 'ambiguous refs' warning
Diffstat (limited to 't/t5521-pull-options.sh')
-rwxr-xr-x | t/t5521-pull-options.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/t/t5521-pull-options.sh b/t/t5521-pull-options.sh index 18372caa15..ded8f98dbe 100755 --- a/t/t5521-pull-options.sh +++ b/t/t5521-pull-options.sh @@ -144,4 +144,25 @@ test_expect_success 'git pull --all --dry-run' ' ) ' +test_expect_success 'git pull --allow-unrelated-histories' ' + test_when_finished "rm -fr src dst" && + git init src && + ( + cd src && + test_commit one && + test_commit two + ) && + git clone src dst && + ( + cd src && + git checkout --orphan side HEAD^ && + test_commit three + ) && + ( + cd dst && + test_must_fail git pull ../src side && + git pull --allow-unrelated-histories ../src side + ) +' + test_done |