remote.c: report specific errors from branch_get_upstream
[gitweb.git] / t / t3032-merge-recursive-options.sh
index 796f616abf17f40e59212b7abb80867f851baa55..4029c9c8c06d24887e7d9fa7c97c2c8c5826eb42 100755 (executable)
@@ -13,16 +13,23 @@ test_description='merge-recursive options
 
 . ./test-lib.sh
 
+test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b
+if test_have_prereq GREP_STRIPS_CR
+then
+       GREP_OPTIONS=-U
+       export GREP_OPTIONS
+fi
+
 test_expect_success 'setup' '
        conflict_hunks () {
-               sed -n -e "
-                       /^<<<</ b inconflict
+               sed $SED_OPTIONS -n -e "
+                       /^<<<</ b conflict
                        b
-                       : inconflict
+                       : conflict
                        p
                        /^>>>>/ b
                        n
-                       b inconflict
+                       b conflict
                " "$@"
        } &&