Re: [PATCH 4/4] t4200: avoid passing a non-newline terminated file to sed
Show 17 quoted lines
> Some versions of sed exit non-zero if the file they are supplied is not
> newline terminated. Solaris's /usr/xpg4/bin/sed is one such sed. So
> rework this test to avoid doing so.
> ---
> t/t4200-rerere.sh | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh
> index b68ab11..48dbd8e 100755
> --- a/t/t4200-rerere.sh
> +++ b/t/t4200-rerere.sh
> @@ -190,7 +190,7 @@ test_expect_success 'file2 added differently in two branches' '
> git add file2 &&
> git commit -m version2 &&
> test_must_fail git merge fourth &&
> - sha1=$(sed -e "s/ .*//" .git/MERGE_RR) &&
> + sha1=$({ cat .git/MERGE_RR; echo; } | sed -e "s/ .*//") &&Couldn't that line become
sha1=$(cat .git/MERGE_RR) &&
sha1=%{sha1%% *} &&(a literal tab before the '*')?
-- Hannes