From: Jeff King Date: Wed, 01 Jun 2016 20:32:43 GMT Subject: Re: [BUG] git-submodule has bash-ism? Message-ID: <20160601203243.GA15490@sigill.intra.peff.net> In-Reply-To: <20160601202852.GP1355@john.keeping.me.uk> On Wed, Jun 01, 2016 at 09:28:53PM +0100, John Keeping wrote: > > So either way, I do not think "local variable names" that breaks > > &&-chain can be justified. Either the variable must be localized > > for the script to work correctly, in which case we want local with > > &&-chaining, or it does not have to, in which case we do not want to > > have "local" that is not necessary, no? > > Absolutely, my original point should have been prefixed with: I wonder > if the reason we haven't had any problems reported is because ... > > And we've got lucky because the clobbering of global variables happens > not to matter in these particular cases. Ah, OK, what you were saying makes much more sense to me now, then. Even on a shell like ksh93 that does not grok local at all, there is a good chance that nobody ever looked at the "-v" output for the test, which would not have been failing, to see that it was complaining. So I agree we can't really take "no problems reported" on these existing cases as any kind of data point. -Peff