Skip to content

Commit

Permalink
Side-step sed line-ending "corruption" leading to t6038 failure.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
sunshineco authored and patthoyts committed Oct 3, 2010
1 parent 97f2c33 commit ca02ad3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion t/t6038-merge-text-auto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down Expand Up @@ -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/" "$@"
}
'

Expand Down

0 comments on commit ca02ad3

Please sign in to comment.