All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "René Scharfe" <l.s.r@web.de>
Cc: Jeff King <peff@peff.net>, Git List <git@vger.kernel.org>,
	Kevin Willford <Kevin.Willford@microsoft.com>
Subject: Re: [PATCH] p3400: stop using tac(1)
Date: Thu, 07 Oct 2021 16:44:04 -0700	[thread overview]
Message-ID: <xmqqzgrkmmd7.fsf@gitster.g> (raw)
In-Reply-To: <a3377973-4f4a-376a-f02e-94a3b20dd9ad@web.de> ("René Scharfe"'s message of "Thu, 7 Oct 2021 22:42:08 +0200")

René Scharfe <l.s.r@web.de> writes:

> In my mind, test is an external command.  Wikipedia [1] says it has been
> a builtin since the early 80ies, and I couldn't find a shell without it.
> I wonder where I picked up that outdated assumption -- I'm not actually
> _that_ old.  Time for an update..

Funny, as I was wondering about the same thing the other day in a
totally different context.

Our older shell script (like tests) tends to strongly prefer "case
... esac" over "test" for this exact reason, e.g option parsing loop
often uses

    while case $#,$1 in 0,*) break ;; *,-*) ;; *) break ;; esac
    do
	...

instead of

    while test $# -gt 0 && ...

to avoid "test".  I'm not actually _that_ old, either, but my
current suspicion is that those who traind us are old enough ;-)



      reply	other threads:[~2021-10-07 23:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-02 17:44 [PATCH] p3400: stop using tac(1) René Scharfe
2021-10-04  8:31 ` Jeff King
2021-10-05 18:45   ` René Scharfe
2021-10-05 19:38     ` Jeff King
2021-10-05 19:54       ` René Scharfe
2021-10-07 20:42       ` René Scharfe
2021-10-07 23:44         ` Junio C Hamano [this message]

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=xmqqzgrkmmd7.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=Kevin.Willford@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=l.s.r@web.de \
    --cc=peff@peff.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.