git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: "Torsten Bögershausen" <tboegi@web.de>, git@vger.kernel.org
Subject: Re: [PATCH] t6011: fix misconversion from perl to sed
Date: Wed, 07 May 2025 08:29:59 -0700	[thread overview]
Message-ID: <xmqqr010e8w8.fsf@gitster.g> (raw)
In-Reply-To: <aBroM9wh7Oo0xMU2@pks.im> (Patrick Steinhardt's message of "Wed, 7 May 2025 06:57:23 +0200")

Patrick Steinhardt <ps@pks.im> writes:

> 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.



      reply	other threads:[~2025-05-07 15:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-06 12:32 Problems with t6011 Torsten Bögershausen
2025-05-06 21:18 ` Junio C Hamano
2025-05-06 22:48 ` [PATCH] t6011: fix misconversion from perl to sed Junio C Hamano
2025-05-07  4:57   ` Patrick Steinhardt
2025-05-07 15:29     ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqr010e8w8.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=ps@pks.im \
    --cc=tboegi@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).