From: Junio C Hamano <gitster@pobox.com>
To: Carlo Arenas <carenas@gmail.com>
Cc: Taylor Blau <me@ttaylorr.com>, git@vger.kernel.org, Jens.Lehmann@web.de
Subject: Re: [PATCH] test-lib-functions: avoid non POSIX ERE in test_dir_is_empty()
Date: Thu, 26 Aug 2021 12:21:19 -0700 [thread overview]
Message-ID: <xmqqfsuwdnbk.fsf@gitster.g> (raw)
In-Reply-To: <CAPUEspjGkHhFNgTe3HnnUvkzwHfKqb9dYO3aCXDh_fRyFMRN6A@mail.gmail.com> (Carlo Arenas's message of "Wed, 25 Aug 2021 23:28:40 -0700")
Carlo Arenas <carenas@gmail.com> writes:
> egrep (and also fgrep, which we intentionally support because it is
> missing from some ancient AIX system[1]) will be removed in the
> next[2] release of GNU grep.
It is not a reason not to nudge us to prepare for the eventual
removal of these two commands, but we need to keep the facts
straight in our log messages.
The way I read [2], they will only start giving a warning message
nudging the users to use "grep -[EF]", and for them to be able to
warn, I would imagine they have to stay in the release without
getting removed.
> [1] 87539416fd (tests: grep portability fixes, 2008-09-30)
> [2] https://git.savannah.gnu.org/cgit/grep.git/commit/?id=a9515624709865d480e3142fd959bccd1c9372d1
There are about 35 places in t/ we call egrep or fgrep; if we can
add a pair of replacement shell functions in t/test-lib.sh for them
to use whatever command GIT_TEST_EGREP and GIT_TEST_FGREP
environment variables specify and fall back on "grep -E/-F"
otherwise, we can prepare for the change without too much code
churning.
Something along the lines of
# in test-lib-functions.sh
: ${GIT_TEST_EGREP:=grep -E} ${GIT_TEST_FGREP:=grep -F}
egrep () { $GIT_TEST_EGREP "$@" }
fgrep () { $GIT_TEST_FGREP "$@" }
where people could do something silly like
GIT_TEST_FGREP='command fgrep' \
GIT_TEST_EGREP='command egrep' \
make test
perhaps?
prev parent reply other threads:[~2021-08-26 19:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-26 3:17 [PATCH] test-lib-functions: avoid non POSIX ERE in test_dir_is_empty() Carlo Marcelo Arenas Belón
2021-08-26 4:24 ` Taylor Blau
2021-08-26 6:25 ` Junio C Hamano
2021-08-26 7:48 ` Carlo Arenas
2021-08-26 6:28 ` Carlo Arenas
2021-08-26 19:21 ` 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=xmqqfsuwdnbk.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=Jens.Lehmann@web.de \
--cc=carenas@gmail.com \
--cc=git@vger.kernel.org \
--cc=me@ttaylorr.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 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.