Skip to content

Commit 232ce5f

Browse files
committed
t5000: Fix CRLF vs LF issue
All CRLF vs LF errors are introduced by the tr tool. Signed-off-by: Thomas Braun <[email protected]>
1 parent c3051df commit 232ce5f

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

t/t5000-tar-tree.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,11 @@ test_expect_success 'archive --list shows only enabled remote filters' '
240240
test_expect_success 'invoke tar filter by format' '
241241
git archive --format=tar.foo HEAD >config.tar.foo &&
242242
tr ab ba <config.tar.foo >config.tar &&
243+
d2u_force config.tar &&
243244
test_cmp_bin b.tar config.tar &&
244245
git archive --format=bar HEAD >config.bar &&
245246
tr ab ba <config.bar >config.tar &&
247+
d2u_force config.tar &&
246248
test_cmp_bin b.tar config.tar
247249
'
248250

@@ -267,6 +269,7 @@ test_expect_success 'only enabled filters are available remotely' '
267269
test_must_fail git archive --remote=. --format=tar.foo HEAD \
268270
>remote.tar.foo &&
269271
git archive --remote=. --format=bar >remote.bar HEAD &&
272+
d2u_force config.bar &&
270273
test_cmp_bin remote.bar config.bar
271274
'
272275

t/test-lib-functions.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -866,3 +866,11 @@ mingw_read_file_strip_cr_ () {
866866
eval "$1=\$$1\$line"
867867
done
868868
}
869+
870+
# Perform dos2unix line ending conversion for binary files
871+
d2u_force() {
872+
if test_have_prereq MINGW
873+
then
874+
dos2unix --force "$1"
875+
fi
876+
}

0 commit comments

Comments
 (0)