From: Jeff King <peff@peff.net>
To: "Torsten Bögershausen" <tboegi@web.de>
Cc: Michael J Gruber <git@drmicha.warpmail.net>,
git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCHv2] add: ignore only ignored files
Date: Sun, 23 Nov 2014 14:50:42 -0500 [thread overview]
Message-ID: <20141123195041.GA16854@peff.net> (raw)
In-Reply-To: <5470FE0A.1030802@web.de>
On Sat, Nov 22, 2014 at 10:20:10PM +0100, Torsten Bögershausen wrote:
> > I do not think there is a real _downside_ to using test_must_fail for
> > grep, except that it is a bit more verbose.
> We may burn CPU cycles
It adds a single if/else chain. If your shell does not implement that as
a fast builtin, you have bigger performance problems. :)
> I counted 19 "test_must_fail grep" under t/*sh, and 201 "! grep".
I do not mind a patch to fix them, but with the usual caveat of avoiding
stepping on the toes of any topics in flight. It is also fine to leave
them until the area is touched.
> As a general rule for further review of shell scripts can we say ?
> ! git # incorrect, we don't capture e.g. segfaults of signal
> test_must_fail grep # correct, but not preferred for new code
> ! grep # preferred for new code
> test_must_fail git # correct
I think that's true. The snippet from t/README Junio quoted lays it out
pretty clearly, I think. If you didn't know there was documentation in
t/README that was worth reading before writing tests, then that is the
thing I think should go in CodingGuidelines.
-Peff
next prev parent reply other threads:[~2014-11-23 19:50 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-19 14:52 [RFD/PATCH] add: ignore only ignored files Michael J Gruber
2014-11-19 18:51 ` Junio C Hamano
2014-11-19 19:15 ` Jeff King
2014-11-19 21:43 ` Junio C Hamano
2014-11-20 9:42 ` Michael J Gruber
2014-11-20 15:56 ` Jeff King
2014-11-20 17:23 ` Junio C Hamano
2014-11-20 18:20 ` Jeff King
2014-11-21 15:39 ` Michael J Gruber
2014-11-21 16:08 ` [PATCHv2] " Michael J Gruber
2014-11-21 18:01 ` Jeff King
2014-11-22 14:59 ` Torsten Bögershausen
2014-11-22 19:19 ` Jeff King
2014-11-22 21:20 ` Torsten Bögershausen
2014-11-23 19:50 ` Jeff King [this message]
2014-11-23 18:10 ` Junio C Hamano
2014-11-23 19:46 ` Jeff King
2014-11-24 17:41 ` Junio C Hamano
2014-11-24 20:22 ` Torsten Bögershausen
2014-11-25 3:57 ` Jeff King
2014-11-24 10:29 ` Michael J Gruber
2014-11-24 10:23 ` Michael J Gruber
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=20141123195041.GA16854@peff.net \
--to=peff@peff.net \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=tboegi@web.de \
/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).