git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: Boxuan Li <liboxuan@connect.hku.hk>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH] t4253-am-keep-cr-dos: avoid using pipes
Date: Sun, 5 May 2019 02:32:19 -0400	[thread overview]
Message-ID: <CAPig+cRuiXh2NgTt1_-en=AzYEsu1P1HgDLo=PFgzZiVxSRDqg@mail.gmail.com> (raw)
In-Reply-To: <20190505023852.33986-1-liboxuan@connect.hku.hk>

On Sat, May 4, 2019 at 10:39 PM Boxuan Li <liboxuan@connect.hku.hk> wrote:
> The exit code of the upstream in a pipe is ignored thus we should avoid
> using it. By writing out the output of the git command to a file, we can
> test the exit codes of both the commands.
>
> Signed-off-by: Boxuan Li <liboxuan@connect.hku.hk>
> ---
> diff --git a/t/t4253-am-keep-cr-dos.sh b/t/t4253-am-keep-cr-dos.sh
> @@ -51,14 +51,16 @@ test_expect_success 'am with dos files without --keep-cr' '
>  test_expect_success 'am with dos files with --keep-cr' '
>         git checkout -b dosfiles-keep-cr initial &&
> -       git format-patch -k --stdout initial..master | git am --keep-cr -k -3 &&
> +       git format-patch -k --stdout initial..master > actual &&
> +       git am --keep-cr -k -3 actual &&

Style nit: In this codebase, the space is omitted after the
redirection operator (i.e. >actual).

Nit: Given that the name "actual" is typically used in conjunction
with an "expect" (or "expected") file, its use here is somewhat
unexpected. Other possible names which might be more meaningful
include "patches" and "output".

>         git diff --exit-code master
>  '

      reply	other threads:[~2019-05-05  6:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-05  2:38 [PATCH] t4253-am-keep-cr-dos: avoid using pipes Boxuan Li
2019-05-05  6:32 ` Eric Sunshine [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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPig+cRuiXh2NgTt1_-en=AzYEsu1P1HgDLo=PFgzZiVxSRDqg@mail.gmail.com' \
    --to=sunshine@sunshineco.com \
    --cc=git@vger.kernel.org \
    --cc=liboxuan@connect.hku.hk \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).