On 22 Sep 2015, at 03:10, Junio C Hamano <gits...@pobox.com> wrote:

> Eric Sunshine <sunsh...@sunshineco.com> writes:
> 
>> Yes, it's because $d is a variable reference, even within double
>> quotes.
> 
> s/even/especially/ ;-)
> 
> Here is what I queued as SQUASH???
> 
> diff --git a/t/t9825-git-p4-handle-utf16-without-bom.sh 
> b/t/t9825-git-p4-handle-utf16-without-bom.sh
> index 65c3c4e..735c0bb 100644
> --- a/t/t9825-git-p4-handle-utf16-without-bom.sh
> +++ b/t/t9825-git-p4-handle-utf16-without-bom.sh
> @@ -22,8 +22,8 @@ test_expect_success 'init depot with UTF-16 encoded file 
> and artificially remove
>               cd "db" &&
>               p4d -jc &&
>               # P4D automatically adds a BOM. Remove it here to make the file 
> invalid.
> -             sed -e "$ d" depot/file1,v >depot/file1,v.new &&
> -             mv -- depot/file1,v.new depot/file1,v &&
> +             sed -e "\$d" depot/file1,v >depot/file1,v.new &&
> +             mv depot/file1,v.new depot/file1,v &&
>               printf "@$UTF16@" >>depot/file1,v &&
>               p4d -jrF checkpoint.1
>       )

This works. I even tested successfully this one:

sed \$d depot/file1,v >depot/file1,v.new &&

Do we need the ā€œ-eā€ option?

Thanks,
Lars


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to