On Thu, Dec 26, 2019 at 2:57 PM Jonathan Nieder <jrnieder@xxxxxxxxx> wrote: > Just like assigning a nonempty value, assigning an empty value to a > shell variable when calling a function produces non-portable behavior: > in some shells, the assignment lasts for the duration of the function > invocation, and in others, it persists after the function returns. > > Signed-off-by: Jonathan Nieder <jrnieder@xxxxxxxxx> > --- > diff --git a/t/check-non-portable-shell.pl b/t/check-non-portable-shell.pl > @@ -46,7 +46,7 @@ sub err { > - /^\s*([A-Z0-9_]+=(\w+|(["']).*?\3)\s+)+(\w+)/ and exists($func{$4}) and > + /^\s*([A-Z0-9_]+=(\w*|(["']).*?\3)\s+)+(\w+)/ and exists($func{$4}) and > err '"FOO=bar shell_func" assignment extends beyond "shell_func"'; Thanks, the change makes sense. I suspect that I simply overlooked this case when implementing this. Acked-by: me