status: differentiate interactive from non-interactive rebases
[gitweb.git] / t / t6026-merge-attr.sh
index 1ba0a252230a283a6bb2463d98537aab1eaf4fb8..3c21938a6891feb61f821bc46ff8f09f1ee009d1 100755 (executable)
@@ -11,7 +11,7 @@ test_expect_success setup '
 
        for f in text binary union
        do
-               echo Initial >$f && git add $f || break
+               echo Initial >$f && git add $f || return 1
        done &&
        test_tick &&
        git commit -m Initial &&
@@ -19,7 +19,7 @@ test_expect_success setup '
        git branch side &&
        for f in text binary union
        do
-               echo Master >>$f && git add $f || break
+               echo Master >>$f && git add $f || return 1
        done &&
        test_tick &&
        git commit -m Master &&
@@ -27,7 +27,7 @@ test_expect_success setup '
        git checkout side &&
        for f in text binary union
        do
-               echo Side >>$f && git add $f || break
+               echo Side >>$f && git add $f || return 1
        done &&
        test_tick &&
        git commit -m Side &&
@@ -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