summaryrefslogtreecommitdiff
path: root/t/t6038-merge-text-auto.sh
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2010-09-17 13:16:01 (GMT)
committerPat Thoyts <patthoyts@users.sourceforge.net>2010-10-03 22:29:19 (GMT)
commitca02ad3447efdbd4cb2aa9ba0ee3fc6124035274 (patch)
treef73eea5252eed6ad83b9e59d7ac53ceaa8758818 /t/t6038-merge-text-auto.sh
parent97f2c33a52d2c33d6f6c8569e875fde0ef18e2e2 (diff)
downloadgit-ca02ad3447efdbd4cb2aa9ba0ee3fc6124035274.zip
git-ca02ad3447efdbd4cb2aa9ba0ee3fc6124035274.tar.gz
git-ca02ad3447efdbd4cb2aa9ba0ee3fc6124035274.tar.bz2
Side-step sed line-ending "corruption" leading to t6038 failure.
By default, MSYS sed throws away CR from CRLF line-endings. Tests t6038.5 and t6038.6 employ sed to normalize conflict output of git-merge for validation purposes. These tests expect CRLF line-endings to be present in the normalized output of git-merge, and thus fail when sed undesirably removes CR. Fix by employing sed's -b/--binary switch to suppress its default behavior of dropping CR characters. Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Diffstat (limited to 't/t6038-merge-text-auto.sh')
-rwxr-xr-xt/t6038-merge-text-auto.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/t/t6038-merge-text-auto.sh b/t/t6038-merge-text-auto.sh
index 52d0dc4..460bf74 100755
--- a/t/t6038-merge-text-auto.sh
+++ b/t/t6038-merge-text-auto.sh
@@ -14,6 +14,8 @@ test_description='CRLF merge conflict across text=auto change
. ./test-lib.sh
+test_have_prereq MINGW && SED_OPTIONS=-b
+
test_expect_success setup '
git config core.autocrlf false &&
@@ -60,7 +62,7 @@ test_expect_success setup '
test_expect_success 'set up fuzz_conflict() helper' '
fuzz_conflict() {
- sed -e "s/^\([<>=]......\) .*/\1/" "$@"
+ sed $SED_OPTIONS -e "s/^\([<>=]......\) .*/\1/" "$@"
}
'