diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-03-18 21:21:09 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-04-21 20:58:51 +0200 |
commit | 09c2cb877a9cc0f6f25eac8d43663f4e8f3309a4 (patch) | |
tree | 0e1a2e163c79237d21c8912c6af9c92b65bf8815 /t/t5521-pull-options.sh | |
parent | t3033: avoid 'ambiguous refs' warning (diff) | |
download | git-09c2cb877a9cc0f6f25eac8d43663f4e8f3309a4.tar.xz git-09c2cb877a9cc0f6f25eac8d43663f4e8f3309a4.zip |
pull: pass --allow-unrelated-histories to "git merge"
The previous commit said:
We could add the same option to "git pull" and have it passed
through to underlying "git merge". I do not have a fundamental
opposition against such a feature, but this commit does not do
so and instead leaves it as low-hanging fruit for others,
because such a "two project merge" would be done after fetching
the other project into some location in the working tree of an
existing project and making sure how well they fit together, it
is sufficient to allow a local merge without such an option
pass-through from "git pull" to "git merge".
Prepare a patch to make it a reality, just in case it is needed.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 |