From: Prathamesh Chavan <pc44800@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Stefan Beller <sbeller@google.com>, Johannes Sixt <j6t@kdbg.org>,
"git@vger.kernel.org" <git@vger.kernel.org>,
Pranit Bauva <pranit.bauva@gmail.com>
Subject: Re: [PATCH] t*: avoid using pipes
Date: Wed, 8 Mar 2017 19:02:27 +0530 [thread overview]
Message-ID: <CAME+mvUzR6--AeUff6yGZ69GN-hE6AyDP-CkdFxnFAwccpn2yg@mail.gmail.com> (raw)
In-Reply-To: <20170308060334.6ilcjgaxgycuhpxu@sigill.intra.peff.net>
On Wed, Mar 8, 2017 at 11:33 AM, Jeff King <peff@peff.net> wrote:
> On Tue, Mar 07, 2017 at 12:52:49PM -0800, Stefan Beller wrote:
>
>> On Tue, Mar 7, 2017 at 12:39 PM, Johannes Sixt <j6t@kdbg.org> wrote:
>>
>> > Welcome to the Git community!
>>
>> >
>> > Actually, being a *micro* project, it should stay so. Not doing all of the
>> > changes would leave some tasks for other apprentices to get warm with our
>> > review process.
>>
>> right, so just pick one file.
>
> I also wonder if we really want all invocations of git to be marked up
> in this way. If the primary goal of the test is checking that a certain
> git command runs successfully and generates the expected output, then I
> think it is a good candidate for conversion.
>
> So in a hunk like this:
>
> test_expect_success 'git commit-tree records the correct tree in a commit' '
> commit0=$(echo NO | git commit-tree $P) &&
> - tree=$(git show --pretty=raw $commit0 |
> - sed -n -e "s/^tree //p" -e "/^author /q") &&
> + tree=$(git show --pretty=raw $commit0 >out &&
> + sed -n -e "s/^tree //p" -e "/^author /q" <out) &&
> test "z$tree" = "z$P"
>
> we are interested in testing commit-tree, not "git show". Is it worth
> avoiding pipes there? I admit the cost to using the intermediate file is
> not huge there, but it feels more awkward and un-shell-like to me as a
> reader.
>
> -Peff
Thank you everyone, for reviewing my changes. And as said in the
reviews, I'll send a single patch file as my microproject, leaving the other
files as low hanging fruit for the others to look at. Also, I try to include as
many suggested improvements as possible and will also remember them for
my future patches.
next prev parent reply other threads:[~2017-03-08 14:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-07 16:10 [PATCH] t*: avoid using pipes Prathamesh Chavan
2017-03-07 17:21 ` Stefan Beller
2017-03-07 20:39 ` Johannes Sixt
2017-03-07 20:52 ` Stefan Beller
2017-03-08 6:03 ` Jeff King
2017-03-08 13:32 ` Prathamesh Chavan [this message]
2017-03-09 5:26 ` Prathamesh Chavan
-- strict thread matches above, loose matches on Subject: below --
2017-03-07 16:18 Prathamesh Chavan
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=CAME+mvUzR6--AeUff6yGZ69GN-hE6AyDP-CkdFxnFAwccpn2yg@mail.gmail.com \
--to=pc44800@gmail.com \
--cc=git@vger.kernel.org \
--cc=j6t@kdbg.org \
--cc=peff@peff.net \
--cc=pranit.bauva@gmail.com \
--cc=sbeller@google.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.
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).