On 2021-05-04 at 15:09:54, Ævar Arnfjörð Bjarmason wrote: > > On Tue, May 04 2021, Junio C Hamano wrote: > > > Ævar Arnfjörð Bjarmason writes: > > > >> It's effectively synonymous with saying "we still want to support git on > >> platforms that are so broken they can't even run a single test in our > >> test suite". > > > > Not really. Those on such a platform would (rightly) say that it is > > the test suite that is broken and out of compliance. > > Indeed. But the lack of any reports about that suggests that in practice > this is universally supported enough to be a hard dependency. > > In any case, it's clear you don't agree and you manage the patch > queue. So I'll leave it at that. I don't feel very strongly, but I would be fine with requiring local. One of the main reasons the Austin Group is having trouble standardizing it is because some shells implement it with lexical scoping and some use dynamic scoping, but if we try not to make too many assumptions, we'll probably be okay. > My aim here was to discover if we had any reason to think that "local" > was less universally implemented than other POSIX/C89-plus features we > rely on. It seems that it's not. "local" is missing in AT&T ksh. As far as I'm aware, all of the other major open source shells support it: bash, dash, mksh, posh, and zsh, plus the default shells on most BSDs, so there are options for people who would like to use Git on systems with a less capable shell. As a practical matter, that means someone on a proprietary Unix or possibly a non-Unix system. In the latter case, we've only seen Plan 9, I believe, which is so devoid of reasonably functional basic Unix tools that it's probably hopeless, and therefore we really only need to consider Windows and Unix systems. I should point out that we also make several non-POSIX assumptions about shell behavior in our testsuite. I fixed one in c64368e3a2 ("t9001: avoid including non-trailing NUL bytes in variables", 2019-11-27), but the other one we make is that all components of a pipeline are run in subshells, which is not true of AT&T ksh or zsh (in zsh mode), which run the last item in the main shell. This assumption used to break running zsh on our testsuite, but the developers recently accepted a patch to make zsh in sh mode emulate what all other sh implementations do because this assumption is so widespread that, as a practical matter, many things break in such a case (the Git testsuite being one of them, but also things like Debian's debconf). So I'm okay with requiring a little more than POSIX behavior here because as a practical matter we already do and POSIX permits a wide variety of behavior which is never implemented (e.g., running something _other_ than the last element in a pipeline in the main shell) and which we could not practically test. I agree that we should aim for targets which provide excellent compatibility and that when in doubt, we should look to POSIX. -- brian m. carlson (he/him or they/them) Houston, Texas, US