git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v4 1/2] git-p4: add test case for "Translation of file content failed" error

From
Lars Schneider <larsxschneider@gmail.com>
Date
Sep 22, 2015, 10:09 UTC
Message-ID
<9F835973-7045-4AA7-A0B0-D3D3C6F25D73@gmail.com>
In-Reply-To
<xmqqbncv6yym.fsf@gitster.mtv.corp.google.com>
On 22 Sep 2015, at 03:10, Junio C Hamano <gitster@pobox.com> wrote:
Show 24 quoted lines
> Eric Sunshine <sunshine@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

Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 14 in “git-p4: handle "Translation of file content failed"”
  1. 0/2 git-p4: handle "Translation of file content failed"larsxschneider@gmail.com, Sep 21, 2015
  2. 1/2 git-p4: add test case for "Translation of file content failed" errorlarsxschneider@gmail.com, Sep 21, 2015
  3. Junio C HamanoSep 21, 2015
  4. Lars SchneiderSep 21, 2015
  5. Eric SunshineSep 21, 2015
  6. Junio C HamanoSep 22, 2015
  7. Lars SchneiderSep 22, 2015
  8. Junio C HamanoSep 22, 2015
  9. Michael BlumeSep 22, 2015
  10. Junio C HamanoSep 22, 2015
  11. Lars SchneiderSep 23, 2015
  12. Lars SchneiderSep 22, 2015
  13. Junio C HamanoSep 22, 2015
  14. 2/2 git-p4: handle "Translation of file content failed"larsxschneider@gmail.com, Sep 21, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.