From: Andreas Ericsson <ae@op5.se>
To: Jeff King <peff@peff.net>
Cc: "Shawn O. Pearce" <spearce@spearce.org>, git@vger.kernel.org
Subject: Re: [PATCH] tests: grep portability fixes
Date: Tue, 30 Sep 2008 12:12:06 +0200 [thread overview]
Message-ID: <48E1FB76.1040500@op5.se> (raw)
In-Reply-To: <20080930080355.GA19605@sigill.intra.peff.net>
Jeff King wrote:
> We try to avoid using the "-q" or "-e" options, as they are
> largely useless, as explained in aadbe44f.
>
> There is one exception for "-e" here, which is in t7701 used
> to produce an "or" of patterns. This can be rewritten as an
> egrep pattern.
>
> This patch also removes use of "grep -F" in favor of the
> more widely available "fgrep".
>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
>
> diff --git a/t/t0002-gitfile.sh b/t/t0002-gitfile.sh
> index 4db4ac4..cb14425 100755
> --- a/t/t0002-gitfile.sh
> +++ b/t/t0002-gitfile.sh
> @@ -32,7 +32,7 @@ test_expect_success 'bad setup: invalid .git file format' '
> echo "git rev-parse accepted an invalid .git file"
> false
> fi &&
> - if ! grep -qe "Invalid gitfile format" .err
> + if ! grep "Invalid gitfile format" .err
Doesn't output need to be redirected when you drop '-q'?
Other than that, this looks good after a quick scan.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
next prev parent reply other threads:[~2008-09-30 10:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-30 8:03 [PATCH] tests: grep portability fixes Jeff King
2008-09-30 10:12 ` Andreas Ericsson [this message]
2008-09-30 10:29 ` Johannes Sixt
2008-09-30 12:45 ` Jeff King
2008-09-30 10:25 ` Johannes Sixt
2008-09-30 11:10 ` Mike Ralphson
2008-09-30 12:44 ` Jeff King
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=48E1FB76.1040500@op5.se \
--to=ae@op5.se \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=spearce@spearce.org \
/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.