From: Jeff King <peff@peff.net>
To: Duy Nguyen <pclouds@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] lib-httpd.sh: print error.log on error
Date: Mon, 13 Jun 2016 07:56:08 -0400 [thread overview]
Message-ID: <20160613115608.GA5652@sigill.intra.peff.net> (raw)
In-Reply-To: <20160613114014.GA15562@ash>
On Mon, Jun 13, 2016 at 06:40:14PM +0700, Duy Nguyen wrote:
> I like the verbose route, so here's v2
I think this is OK, though...
> diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh
> index f9f3e5f..67bc7ad 100644
> --- a/t/lib-httpd.sh
> +++ b/t/lib-httpd.sh
> @@ -180,6 +180,8 @@ start_httpd() {
> if test $? -ne 0
> then
> trap 'die' EXIT
> + test "$verbose" = t && \
> + cat "$HTTPD_ROOT_PATH"/error.log 2>/dev/null
I think you can just spell this:
cat >&4 ...
(I had originally thought that we set up those fds only inside the
test_expect blocks, but it is the redirection 2>&4 that we set up there;
you can always use fd 4 as necessary).
It does incur a useless "cat" when we are not verbose, but I don't think
that's a big deal for the error path like this.
-Peff
next prev parent reply other threads:[~2016-06-13 11:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-12 10:41 [PATCH] lib-httpd.sh: print error.log on error Nguyễn Thái Ngọc Duy
2016-06-12 12:59 ` Jeff King
2016-06-13 11:40 ` Duy Nguyen
2016-06-13 11:56 ` Jeff King [this message]
2016-06-13 12:35 ` [PATCH v3] " Nguyễn Thái Ngọc Duy
2016-06-13 17:08 ` 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=20160613115608.GA5652@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=pclouds@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).