mirror of
https://github.com/git/git
synced 2024-08-27 19:49:21 +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:
parent
39ad164d02
commit
6ae3abf159
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue