From: Junio C Hamano Date: Sat, 05 Sep 2015 20:17:35 GMT Subject: Re: [PATCH 0/5] disallow test_when_finished in subshells Message-ID: In-Reply-To: <20150905175756.GE27660@serenity.lan> >> Isn't it just the matter of resetting the variable regardless of $BASH >> (and ignoring >> a possible refusal to do so under bash) at the beginning of the test, or do you >> really have to rely on the value of $BASH and do things differently? > > Bash doesn't refuse to set it, it lets you update the value; I did think > that it wouldn't update it if the user had overridden the value, but it > looks like that was only because I had unset it first. It seems that > the variable is magic (autoincrementing in subshells and can only be set > to integer values) but if you unset it then it becomes a normal > variable. Yes, resetting to =0 at the very beginning is what I have in mind.