From: Christian Couder <christian.couder@gmail.com>
To: Shanthanu <shanthanu.s.rai9@gmail.com>
Cc: git <git@vger.kernel.org>, "Torsten Bögershausen" <tboegi@web.de>
Subject: Re: [PATCH v2] t9116: avoid using pipes
Date: Tue, 24 Mar 2020 19:34:02 +0100 [thread overview]
Message-ID: <CAP8UFD2Uu-dPJcZB--T7k0tMuXc0iVeqnMUn3Y_x+3iaFf9xFQ@mail.gmail.com> (raw)
In-Reply-To: <20200324093502.32394-1-shanthanu.s.rai9@gmail.com>
On Tue, Mar 24, 2020 at 10:36 AM Shanthanu <shanthanu.s.rai9@gmail.com> wrote:
>
> Commit c6f44e1da5 (t9813: avoid using pipes, 2017-01-04) recommends to
> avoid using pipes, since the exit code of upstream in the pipe is
> ignored. Hence, redirect the output to a file and parse that file.
>
> Commit de26f02db1 (t9001, t9116: avoid pipes, 2020-02-14) noted that
> this also allows easy debugging in case the test fails, since the file
> will be left on disk and can be manually inspected.
>
> Signed-off-by: Shanthanu <shanthanu.s.rai9@gmail.com>
We usually ask for a legal name in a format similar to "<Firstname>
<MaybeMiddleNameInitial> <Lastname>" where <MaybeMiddleNameInitial>
can be omitted. The name should also match what is in the "From:"
field of the emails you send.
> ---
> t/t9116-git-svn-log.sh | 53 +++++++++++++++++++++++++++++++-----------
> 1 file changed, 39 insertions(+), 14 deletions(-)
>
> diff --git a/t/t9116-git-svn-log.sh b/t/t9116-git-svn-log.sh
> index 0a9f1ef366..56d68e4aed 100755
> --- a/t/t9116-git-svn-log.sh
> +++ b/t/t9116-git-svn-log.sh
> @@ -61,12 +61,16 @@ printf 'r1 \nr2 \nr4 \n' > expected-range-r1-r2-r4
>
> test_expect_success 'test ascending revision range' "
> git reset --hard origin/trunk &&
> - git svn log -r 1:4 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r1-r2-r4 -
> + git svn log -r 1:4 >out &&
> + grep '^r[0-9]' out | cut -d'|' -f1 >actual &&
> + test_cmp expected-range-r1-r2-r4 actual
> "
It seems that the code that your patch changes is repeated a lot in
this test script. I wonder if it would be better to write a shell
function to avoid those repetitions.
next prev parent reply other threads:[~2020-03-24 18:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-22 12:46 [GSoC][PATCH 0/1] Microproject Submission Shanthanu
2020-03-22 12:46 ` [GSoC][PATCH 1/1] t9116: avoid using pipes Shanthanu
2020-03-22 17:36 ` Torsten Bögershausen
2020-03-23 7:04 ` Shanthanu
2020-03-24 9:35 ` [PATCH v2] " Shanthanu
2020-03-24 18:34 ` Christian Couder [this message]
2020-03-25 14:00 ` Shanthanu
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=CAP8UFD2Uu-dPJcZB--T7k0tMuXc0iVeqnMUn3Y_x+3iaFf9xFQ@mail.gmail.com \
--to=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=shanthanu.s.rai9@gmail.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.
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).