[Pkg-zsh-devel] Bug#1035679: Bug#1035679: zsh: can misprocess continue in a loop

brian m. carlson sandals at crustytoothpaste.net
Sun May 28 15:05:58 BST 2023


On 2023-05-08 at 00:58:24, Axel Beckert wrote:
> brian m. carlson wrote:
> > This breaks the Git testsuite under zsh's sh mode,
> 
> Hmmm, actually, your example code shows "set" for me even without sh
> emulation mode:
> 
>   → zsh continue.sh
>   set
>   → zsh --emulate sh continue.sh
>   set

Correct.  The Git testsuite only runs under sh mode, not zsh mode, but
it affects all modes.

> > which was formerly passing.
> 
> When was "formerly", i.e. in which package or upstream version?

Git 2.25.  It may be that Git has changed the testsuite to make use of
that syntax between now and then, but as of that revision, it passed.

> > since the release cycle tends to be long
> 
> Well, 5.9 is out for quite a while already. So I think we can expect a
> new release before the the Debian 13 release. ;-)
> 
> But yeah, I think we can cherry-pick this from upstream after the
> Bookworm release.

Great, I appreciate that.

> > and it prevents the shell from being effectively used as a POSIX sh.
> 
> Well, zsh's POSIX mode is officially declared as being incomplete and
> it's IIRC also not recommended to actually use it or at least not rely
> on it.

zsh should be able to run as a POSIX sh.  The reason that we only
support sh mode in Git is that we rely on every command in a pipeline
being run in a subshell, since we only recently introduced the use of
`local` in the shell and otherwise our variables get messed up.
-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-zsh-devel/attachments/20230528/293765bd/attachment.sig>


More information about the Pkg-zsh-devel mailing list