From f94e8a6e000fed58cb8d8c8a6339c0d25c89cda1 Mon Sep 17 00:00:00 2001 From: Pat Thoyts Date: Sun, 1 May 2011 14:47:09 +0100 Subject: [PATCH] t5407: Fix line-ending dependency in post-rewrite.args On msysGit creating the post-rewrite.args file using 'echo' has different line endings from the expected comparison. Using perl normalizes the line endings for each generated file. Signed-off-by: Pat Thoyts --- t/t5407-post-rewrite-hook.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/t/t5407-post-rewrite-hook.sh b/t/t5407-post-rewrite-hook.sh index baa670cea5..35403b435e 100755 --- a/t/t5407-post-rewrite-hook.sh +++ b/t/t5407-post-rewrite-hook.sh @@ -20,9 +20,13 @@ test_expect_success 'setup' ' mkdir .git/hooks cat >.git/hooks/post-rewrite < "$TRASH_DIRECTORY"/post-rewrite.args -cat > "$TRASH_DIRECTORY"/post-rewrite.data +#!/usr/bin/perl +open (AR, ">$TRASH_DIRECTORY/post-rewrite.args"); +print AR \$_,"\n" foreach @ARGV; +open (DAT, ">$TRASH_DIRECTORY/post-rewrite.data"); +while() { + print DAT; +} EOF chmod u+x .git/hooks/post-rewrite -- 2.11.4.GIT