Re: [PATCH V2] t9810: Do not use sed -i
- From
- Pete Wyckoff <pw@padd.com>
- Date
- Jan 2, 2013, 22:44 UTC
- Message-ID
- <20130102224446.GA12363@padd.com>
- In-Reply-To
- <201301020020.38535.tboegi@web.de>
tboegi@web.de wrote on Wed, 02 Jan 2013 00:20 +0100:
Show 7 quoted lines
> sed -i is not portable on all systems. > Use sed with different input and output files. > Utilize a tmp file whenever needed > > Added missing && at 2 places > > Signed-off-by: Torsten Bögershausen <tboegi@web.de>
One more teensy fix is needed in this hunk, following Junio's comment about redirections going at the end:
Show 10 quoted lines
> @@ -139,7 +140,8 @@ test_expect_success 'scrub ko files differently' ' > cd "$git" && > git config git-p4.skipSubmitEdit true && > git config git-p4.attemptRCSCleanup true && > - sed -i "s/^line4/line4 edit/" fileko && > + sed <fileko "s/^line4/line4 edit/" >fileko.tmp && > + mv -f fileko.tmp fileko && > git commit -m "fileko line4 edit" fileko && > git p4 submit && > scrub_ko_check fileko &&
I checked that the test still works with your changes.
Thanks for the cleanup!
Acked-by: Pete Wyckoff <pw@padd.com>
-- Pete