Re: [PATCH v3 4/4] add-patch: render hunks through the pager
- From
Rubén Justo <rjusto@gmail.com>
- Date
- Jul 20, 2024, 22:37 UTC
- Message-ID
- <bc1b9cce-d04d-4a79-8fab-55ec3c8bae30@gmail.com>
- In-Reply-To
- <CAPig+cRyj8J7MZEufu34NUzwOL2n=w35nT1Ug7FGRwMC0=Qpwg@mail.gmail.com>
On Wed, Jul 17, 2024 at 04:09:17PM -0400, Eric Sunshine wrote:
> > >> - test_write_lines P q | GIT_PAGER="head -n 1" test_terminal git add -p
> It's also curious that t/check-non-portable-shell.pl didn't catch this > use of one-shot assignment when calling a shell function[*].
It would have been great if it had caught that error.
As a reference:
func () {
} VAR=value func # this error is caught
echo 1 |
VAR=value func # this one is also caught
echo 1 | VAR=value func # this one isn'tMaybe, catch this errors expanding the regular expression we have in `check-non-portable-shell.pl` isn't the best approach. We might need something more sophisticated, like what we have in `chainlint.pl`.
Perhaps someone with experience in those scripts could give us this capability :-)
Thanks for your message.