Merge branch 'jt/accept-capability-advertisement-when-fetching-from-void'
[gitweb.git] / t / t6026-merge-attr.sh
index 04c0509c476de87bfb679f1c50556ca4c3a3d615..7a6e33e6732eaf69e298b56729ba4ead9ffaee0e 100755 (executable)
@@ -176,8 +176,24 @@ test_expect_success 'up-to-date merge without common ancestor' '
        test_tick &&
        (
                cd repo1 &&
-               git pull ../repo2 master
+               git fetch ../repo2 master &&
+               git merge --allow-unrelated-histories FETCH_HEAD
        )
 '
 
+test_expect_success 'custom merge does not lock index' '
+       git reset --hard anchor &&
+       write_script sleep-one-second.sh <<-\EOF &&
+               sleep 1 &
+               echo $! >sleep.pid
+       EOF
+       test_when_finished "kill \$(cat sleep.pid)" &&
+
+       test_write_lines >.gitattributes \
+               "* merge=ours" "text merge=sleep-one-second" &&
+       test_config merge.ours.driver true &&
+       test_config merge.sleep-one-second.driver ./sleep-one-second.sh &&
+       git merge master
+'
+
 test_done