Thread (6 messages) 6 messages, 4 authors, 2024-07-22

Re: [PATCH v3 4/4] add-patch: render hunks through the pager

From: Rubén Justo <hidden>
Date: 2024-07-20 22:37:11

On Wed, Jul 17, 2024 at 04:09:17PM -0400, Eric Sunshine wrote:
quoted
quoted
quoted
-    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't

Maybe, 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help