mirror of
https://github.com/git/git.git
synced 2026-02-08 08:47:48 +00:00
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 <patthoyts@users.sourceforge.net>
This commit is contained in:
committed by
Johannes Schindelin
parent
5bf667bd87
commit
539c9cd3be
@@ -20,9 +20,13 @@ test_expect_success 'setup' '
|
||||
mkdir .git/hooks
|
||||
|
||||
cat >.git/hooks/post-rewrite <<EOF
|
||||
#!/bin/sh
|
||||
echo \$@ > "$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(<STDIN>) {
|
||||
print DAT;
|
||||
}
|
||||
EOF
|
||||
chmod u+x .git/hooks/post-rewrite
|
||||
|
||||
|
||||
Reference in New Issue
Block a user