t0027: do not use an empty string as a pathspec element
[gitweb.git] / t / t5521-pull-options.sh
index 18372caa151a30ac0ec1f247e793164fe667358a..ded8f98dbed9764744799f7b4bed0c51fc57a158 100755 (executable)
@@ -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