git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "brian m. carlson" <sandals@crustytoothpaste.net>,
	git@vger.kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"SZEDER Gábor" <szeder.dev@gmail.com>,
	"Eric Sunshine" <sunshine@sunshineco.com>
Subject: Re: [PATCH 0/6] test: make the test suite work with zsh
Date: Thu, 30 Mar 2023 08:19:08 -0600	[thread overview]
Message-ID: <CAMP44s3xVL0UHCHh2Ei=STTx=grkpvUTfj6o9roe3tL35GhG4Q@mail.gmail.com> (raw)
In-Reply-To: <xmqqa5zu4ka3.fsf@gitster.g>

On Thu, Mar 30, 2023 at 4:15 AM Junio C Hamano <gitster@pobox.com> wrote:
>
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>
> >> While these patches may make it "work" with zsh in its native mode,
> >> because zsh that is running in its native mode is sufficiently
> >> distant from the more POSIXy portable variants of Bourne shells like
> >> dash and bash, I find it hard to justify the cost of maintaining the
> >> resulting codebase to "work" that way.
> >
> > Why do we follow POSIX anyway?
>
> It is not what we follow that is at the primary issue.
>
> The criteria is more about what our developers are expected to be
> familiar with, and what is reasonable to force our developers to
> become sufficiently familiar with.

That is not true.

This patch 77e572653b (t0050: fix printf format strings for
portability, 2010-12-21) fixed a problem that was specific with dash.
Did our developers have to learn the details of such issue? No.

How about f5799e05c0 (git-submodule.sh: separate parens by a space to
avoid confusing some shells, 2011-05-26)? Did anybody have to learn
that `((foo` causes problems in ksh in order to apply the patch?

No, these patches fixed specific issues for specific shells, and did
not affect what our developers were expected to be familiar with.

> It is my impression, however, that zsh in its native mode is even
> further out and away, pushing it on the other side of the line of
> being reasonable to force our develoerps to adjust to.

Just because it's your impression doesn't mean it's true.

> What they will learn through such an effort would be more of "what to
> do when you are forced to use zsh" than "how to write your shell
> script portably".

No, they don't have to learn anything, just like they don't have to
learn that ksh93 returns signals that are 256+n: 0e418e568f (t0005:
work around strange $? in ksh when program terminated by a signal,
2010-07-09).

You just picked the patch that fixed a specific problem for a specific
shell, and we all forgot about it.

> > Is there some sort of predisposition against zsh?
>
> There isn't.  If somebody makes the tests to also work with csh or
> /bin/sh on SunOS, I would pretty much say the same thing.

Except you did pick the patches that fixed specific issues for these
shells when the existing code was already compliant with POSIX.

--
Felipe Contreras

  reply	other threads:[~2023-03-30 14:19 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-28 17:39 [PATCH 0/6] test: make the test suite work with zsh Felipe Contreras
2023-03-28 17:39 ` [PATCH 1/6] test: fix build for zsh Felipe Contreras
2023-03-28 17:39 ` [PATCH 2/6] test: avoid `stat` variable Felipe Contreras
2023-03-29  9:48   ` Ævar Arnfjörð Bjarmason
2023-04-01  0:05   ` Taylor Blau
2023-04-01  0:25     ` Felipe Contreras
2023-03-28 17:39 ` [PATCH 3/6] test: avoid `options` variable Felipe Contreras
2023-03-28 17:39 ` [PATCH 4/6] test: avoid `path` variable Felipe Contreras
2023-03-28 17:39 ` [PATCH 5/6] test: hack for zsh Felipe Contreras
2023-03-30  8:15   ` Felipe Contreras
2023-03-28 17:39 ` [PATCH 6/6] mergetools: vimdiff: check for empty fields Felipe Contreras
2023-03-29  0:57 ` [PATCH 0/6] test: make the test suite work with zsh brian m. carlson
2023-03-29  1:57   ` Felipe Contreras
2023-03-29  9:51     ` Ævar Arnfjörð Bjarmason
2023-03-29 11:19       ` Felipe Contreras
2023-03-30 13:00         ` Felipe Contreras
2023-03-29 15:34   ` Junio C Hamano
2023-03-29 21:54     ` Felipe Contreras
2023-03-30 10:15       ` Junio C Hamano
2023-03-30 14:19         ` Felipe Contreras [this message]
2023-04-01  0:04           ` Taylor Blau
2023-04-01  0:59             ` Felipe Contreras
2023-04-01  1:30           ` Junio C Hamano
2023-04-01  2:39             ` Felipe Contreras
2023-04-01  0:00         ` Taylor Blau
2023-04-01  0:50           ` Felipe Contreras
2023-03-29 22:14     ` brian m. carlson
2023-03-30  3:15       ` Junio C Hamano
2023-03-30  7:47         ` Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMP44s3xVL0UHCHh2Ei=STTx=grkpvUTfj6o9roe3tL35GhG4Q@mail.gmail.com' \
    --to=felipe.contreras@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sandals@crustytoothpaste.net \
    --cc=sunshine@sunshineco.com \
    --cc=szeder.dev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).