On Mon, Jul 22, 2024 at 04:10:41PM -0700, Junio C Hamano wrote: > Over the years, we accumulated the community wisdom to avoid the > common "one-short export" construct for shell functions, but seem to > have lost on which exact platform it is known to fail. Now during > an investigation on a breakage for a recent topic, we found one > example of failing shell. Let's document that. My recollection was that FreeBSD's /bin/sh was the culprit, but I couldn't find any mention digging in the archive. However, I just checked on a FreeBSD 13 VM, and it does have the same problem (that the one-shot variable is not exported). I don't think that changes anything for your patch, but just reinforces this part: > This does *not* mean that we can freely start using the construct > once Ubuntu 20.04 is retired. But it does mean that we cannot use > the construct until Ubuntu 20.04 is fully retired from the machines > that matter. since now we have one other instance. I thought it also had the issue that the variable would remain set in the caller after the function returned, but it does not seem to do so now (if it ever did). -Peff