From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: "Torsten Bögershausen" <tboegi@web.de>
Cc: Todd Zullinger <tmz@pobox.com>,
Jeff Hostetler <git@jeffhostetler.com>,
Lars Schneider <larsxschneider@gmail.com>,
Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org
Subject: Re: What's cooking in git.git (Dec 2017, #01; Mon, 4)
Date: Sun, 10 Dec 2017 14:50:28 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.21.1.1712101450010.4318@virtualbox> (raw)
In-Reply-To: <20171209144607.GA6443@tor.lan>
[-- Attachment #1: Type: text/plain, Size: 1382 bytes --]
Hi Torsten,
On Sat, 9 Dec 2017, Torsten Bögershausen wrote:
> On Thu, Dec 07, 2017 at 04:33:12PM -0500, Todd Zullinger wrote:
> > Jeff Hostetler wrote:
> > >I'm looking at t5616 now on my mac.
> > >Looks like the MAC doesn't like my line counting in the tests.
> > >I'll fix in my next version.
> >
> []
> > | sort >expect_2.oids &&
> > - test "$(wc -l <expect_2.oids)" = "8" &&
> > + test_line_count = 8 expect_2.oids &&
> > git -C src blame master -- file.1.txt >expect.blame
> > '
>
>
> The problem seems to be the '"' around wc, this would work:
> test $(wc -l <expect_2.oids) = "8" &&
>
>
> What do you guys think a about a lint test like this:
>
> diff --git a/t/check-non-portable-shell.pl b/t/check-non-portable-shell.pl
> index 03dc9d2852..9ebf65c26f 100755
> --- a/t/check-non-portable-shell.pl
> +++ b/t/check-non-portable-shell.pl
> @@ -21,6 +21,7 @@ while (<>) {
> /^\s*declare\s+/ and err 'arrays/declare not portable';
> /^\s*[^#]\s*which\s/ and err 'which is not portable (please use type)';
> /\btest\s+[^=]*==/ and err '"test a == b" is not portable (please use =)';
> + /\bwc -l.*"\s*=/ and err '`"$(wc -l)"` is not portable, please use `$(wc -l)`';
> /\bexport\s+[A-Za-z0-9_]*=/ and err '"export FOO=bar" is not portable (please use FOO=bar && expo
Please suggest `test_line_count` instead.
Ciao,
Dscho
prev parent reply other threads:[~2017-12-10 13:51 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-04 21:46 What's cooking in git.git (Dec 2017, #01; Mon, 4) Junio C Hamano
2017-12-04 22:04 ` Jeff Hostetler
2017-12-04 22:26 ` Elijah Newren
2017-12-04 23:46 ` Jonathan Tan
2017-12-05 0:30 ` Junio C Hamano
2017-12-06 15:14 ` Lars Schneider
2017-12-06 16:03 ` Torsten Bögershausen
2017-12-06 16:48 ` Junio C Hamano
2017-12-07 15:48 ` Johannes Schindelin
2017-12-07 20:22 ` Todd Zullinger
2017-12-07 20:50 ` Junio C Hamano
2017-12-07 21:08 ` Lars Schneider
2017-12-07 21:21 ` Junio C Hamano
2017-12-07 21:08 ` Jeff Hostetler
2017-12-07 21:10 ` Junio C Hamano
2017-12-10 10:50 ` [PATCH v1 1/1] check-non-portable-shell.pl: Quoted `wc -l` is not portable tboegi
2017-12-10 13:59 ` Johannes Schindelin
2017-12-11 23:07 ` Junio C Hamano
2017-12-16 19:52 ` [PATCH v2 " tboegi
2017-12-17 0:06 ` Eric Sunshine
2017-12-21 21:26 ` [PATCH v3 " tboegi
2017-12-22 21:07 ` Junio C Hamano
2017-12-23 7:27 ` Torsten Bögershausen
2017-12-07 21:33 ` What's cooking in git.git (Dec 2017, #01; Mon, 4) Todd Zullinger
2017-12-09 14:46 ` Torsten Bögershausen
2017-12-10 13:50 ` Johannes Schindelin [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.21.1.1712101450010.4318@virtualbox \
--to=johannes.schindelin@gmx.de \
--cc=git@jeffhostetler.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=larsxschneider@gmail.com \
--cc=tboegi@web.de \
--cc=tmz@pobox.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).