From: Junio C Hamano Date: Mon, 30 Dec 2019 23:27:45 GMT Subject: Re: [PATCH 16/16] t4124: let sed open its own files Message-ID: In-Reply-To: <868smt2zqh.fsf@gmail.com> Jakub Narebski writes: > Denton Liu writes: > >> In one case, we were using a redirection operator to feed input into >> sed. However, since sed is capable of opening its own files, make sed >> open its own files instead of redirecting input into it. > > Could you please write in the commit message what advantages does this > change bring? A fair question. My version of short answer is "nothing---it is not wrong to write it either way, and it is not worth the patch churn to rewrite it from one form to the other, once the script is written". If we were to extend these tests in such a way that the command needs to read from more than one input file, though, dropping the redirection like the patch does is a good first step toward that, i.e. extending sed -e "expression" patch to sed -e "expression" patch-1 patch-2 ... would look more natural than starting from sed -e "expression"