]> asedeno.scripts.mit.edu Git - git.git/blobdiff - t/t6026-merge-attr.sh
Merge branch 'as/maint-expire'
[git.git] / t / t6026-merge-attr.sh
index 4b423e937dbd259e5b2311051907a54309e0edb9..5e439972bea358f700ded4266df31f7dc4514800 100755 (executable)
@@ -70,6 +70,18 @@ test_expect_success 'check merge result in working tree' '
 
 '
 
+test_expect_success 'retry the merge with longer context' '
+       echo text conflict-marker-size=32 >>.gitattributes &&
+       git checkout -m text &&
+       sed -ne "/^\([<=>]\)\1\1\1*/{
+               s/ .*$//
+               p
+       }" >actual text &&
+       grep ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" actual &&
+       grep "================================" actual &&
+       grep "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" actual
+'
+
 cat >./custom-merge <<\EOF
 #!/bin/sh
 
@@ -142,4 +154,26 @@ test_expect_success 'custom merge backend' '
        rm -f $o $a $b
 '
 
+test_expect_success 'up-to-date merge without common ancestor' '
+       test_create_repo repo1 &&
+       test_create_repo repo2 &&
+       test_tick &&
+       (
+               cd repo1 &&
+               >a &&
+               git add a &&
+               git commit -m initial
+       ) &&
+       test_tick &&
+       (
+               cd repo2 &&
+               git commit --allow-empty -m initial
+       ) &&
+       test_tick &&
+       (
+               cd repo1 &&
+               git pull ../repo2 master
+       )
+'
+
 test_done