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

Re: [PATCH] t6011: fix misconversion from perl to sed

From
Junio C Hamano <gitster@pobox.com>
Date
May 7, 2025, 15:29 UTC
Message-ID
<xmqqr010e8w8.fsf@gitster.g>
In-Reply-To
<aBroM9wh7Oo0xMU2@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 35 quoted lines
> On Tue, May 06, 2025 at 03:48:55PM -0700, Junio C Hamano wrote:
>> No, this is not about a quiz on regexp compatibility between Perl
>> and sed.
>> 
>> Back when cdbdc6bf (t: refactor tests depending on Perl substitution
>> operator, 2025-04-03) rewrite many use of perl with sed, the general
>
> s/rewrite many use/rewrote many uses/
>
>> pattern of the original scripts were
>> 
>>     chmod +w some_read_only_file &&
>>     perl -p -e "regexp to munge" some_read_only_file >some_tmp &&
>>     mv some_tmp some_read_only_file
>> 
>> persumably because the author new replacing some_read_only_file with
>
> s/new/knew?
>
>> diff --git a/t/t6011-rev-list-with-bad-commit.sh b/t/t6011-rev-list-with-bad-commit.sh
>> index b6f3344dbf..1dd1e50d21 100755
>> --- a/t/t6011-rev-list-with-bad-commit.sh
>> +++ b/t/t6011-rev-list-with-bad-commit.sh
>> @@ -38,6 +38,7 @@ test_expect_success 'verify number of revisions' \
>>  test_expect_success 'corrupt second commit object' '
>>  	for p in .git/objects/pack/*.pack
>>  	do
>> +		chmod +w "$p" &&
>>  		sed "s/second commit/socond commit/" "$p" >"$p.munged" &&
>>  		mv "$p.munged" "$p" ||
>>  		return 1
>
> Ok, the fix makes sense. Thanks!
>
> Patrick
Thanks for typofixes and sanity checking.
Previous: Patrick Steinhardt
Message 5 of 5 in “Problems with t6011”
  1. Torsten BögershausenMay 6, 2025
  2. Junio C HamanoMay 6, 2025
  3. t6011: fix misconversion from perl to sedJunio C Hamano, May 6, 2025
  4. Patrick SteinhardtMay 7, 2025
  5. Junio C HamanoMay 7, 2025

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.