Skip to content

Commit ca02ad3

Browse files
sunshinecopatthoyts
authored andcommitted
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>
1 parent 97f2c33 commit ca02ad3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

t/t6038-merge-text-auto.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ test_description='CRLF merge conflict across text=auto change
1414

1515
. ./test-lib.sh
1616

17+
test_have_prereq MINGW && SED_OPTIONS=-b
18+
1719
test_expect_success setup '
1820
git config core.autocrlf false &&
1921
@@ -60,7 +62,7 @@ test_expect_success setup '
6062

6163
test_expect_success 'set up fuzz_conflict() helper' '
6264
fuzz_conflict() {
63-
sed -e "s/^\([<>=]......\) .*/\1/" "$@"
65+
sed $SED_OPTIONS -e "s/^\([<>=]......\) .*/\1/" "$@"
6466
}
6567
'
6668

0 commit comments

Comments
 (0)