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

Re: [PATCH] t4002: fix "diff can read from stdin" syntax

From
John Cai <johncai86@gmail.com>
Date
Jul 14, 2023, 18:56 UTC
Message-ID
<CEC94FDD-E5F1-48C0-8FBF-05682EBEB035@gmail.com>
In-Reply-To
<279beaea-d332-0d88-3cd0-b935ef6bc5eb@web.de>
On 14 Jul 2023, at 10:44, René Scharfe wrote:
Show 20 quoted lines
> Am 14.07.23 um 15:30 schrieb D. Ben Knoble via GitGitGadget:
>> diff --git a/t/t4002-diff-basic.sh b/t/t4002-diff-basic.sh
>> index d524d4057dc..7afc883ec37 100755
>> --- a/t/t4002-diff-basic.sh
>> +++ b/t/t4002-diff-basic.sh
>> @@ -403,7 +403,7 @@ test_expect_success 'diff-tree -r B A == diff-tree -r -R A B' '
>>  	git diff-tree -r -R $tree_A $tree_B >.test-b &&
>>  	cmp -s .test-a .test-b'
>>
>> -test_expect_success'diff can read from stdin' '
>> +test_expect_success 'diff can read from stdin' '
>>  	test_must_fail git diff --no-index -- MN - < NN |
>>  		grep -v "^index" | sed "s#/-#/NN#" >.test-a &&
>>  	test_must_fail git diff --no-index -- MN NN |
>>
>
> Good find!  Introduced by 9cfcbcc095 (t4002-diff-basic: modernize test
> format, 2023-05-18).  Perhaps an automatic formatter would have avoided
> it?  E.g. some sed(1) scripting, or shfmt (https://github.com/mvdan/sh)?
> (Just discovered shfmt, never used it.)
Thanks for finding this and fixing!
>
> René
Previous: D. Ben KnobleNext: Junio C Hamano
Message 4 of 5 in “t4002: fix "diff can read from stdin" syntax”
  1. t4002: fix "diff can read from stdin" syntaxD. Ben Knoble via GitGitGadget, Jul 14, 2023
  2. René ScharfeJul 14, 2023
  3. D. Ben KnobleJul 14, 2023
  4. John CaiJul 14, 2023
  5. Junio C HamanoJul 14, 2023

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.