git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Darren Tucker <dtucker@dtucker.net>
To: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/7] Redirect grep's stderr top null too.
Date: Tue, 19 May 2020 00:29:47 +1000	[thread overview]
Message-ID: <CALDDTe13_utn7E+QF1AgndX_6nPph=Gr1hesLwfV8e9LwgUPOQ@mail.gmail.com> (raw)
In-Reply-To: <20200518141311.GC1980@danh.dev>

On Tue, 19 May 2020 at 00:13, Đoàn Trần Công Danh <congdanhqx@gmail.com> wrote:
>
> Hi Darren,
>
> On 2020-05-18 20:03:50+1000, Darren Tucker <dtucker@dtucker.net> wrote:
> > Prevents pollution of configure output on platforms that don't have
> > grep -a.
>
> From your other's patch, I think you're in HP-UX,

Yes (it's not my usual platform but I had occasion to test something
on it so revived an old system).

> would you mind also run the test.
>
> Since t5703 also uses "grep -a"

It fails with:
$ ./t5703-upload-pack-ref-in-want.sh
sed: There are too many commands for the s/\n// function.
ok 1 - setup repository
sed: There are too many commands for the s/\n// function.
not ok 2 - config controls ref-in-want advertisement
#
#               test-tool serve-v2 --advertise-capabilities >out &&
#               ! grep -a ref-in-want out &&
#
#               git config uploadpack.allowRefInWant false &&
#               test-tool serve-v2 --advertise-capabilities >out &&
#               ! grep -a ref-in-want out &&
#
#               git config uploadpack.allowRefInWant true &&
#               test-tool serve-v2 --advertise-capabilities >out &&
#               grep -a ref-in-want out
#
sed: There are too many commands for the s/\n// function.
ok 3 - invalid want-ref line
sed: There are too many commands for the s/\n// function.
ok 4 - basic want-ref
sed: There are too many commands for the s/\n// function.
ok 5 - multiple want-ref lines
sed: There are too many commands for the s/\n// function.
ok 6 - mix want and want-ref
sed: There are too many commands for the s/\n// function.
ok 7 - want-ref with ref we already have commit for
sed: There are too many commands for the s/\n// function.
FATAL: Unexpected exit with code 0

If I use gnu sed and native grep, only #2 fails as above.  If I use
gnu grep and gnu sed it passes with a warning from (gnu) printf:
$ ./t5703-upload-pack-ref-in-want.sh
printf: \3: invalid escape
ok 1 - setup repository
ok 2 - config controls ref-in-want advertisement
ok 3 - invalid want-ref line
ok 4 - basic want-ref
ok 5 - multiple want-ref lines
ok 6 - mix want and want-ref
ok 7 - want-ref with ref we already have commit for
ok 8 - setup repos for fetching with ref-in-want tests
ok 9 - fetching with exact OID
ok 10 - fetching multiple refs
ok 11 - fetching ref and exact OID
ok 12 - fetching with wildcard that does not match any refs
ok 13 - fetching with wildcard that matches multiple refs
# passed all 13 test(s)
# SKIP skipping test, git built without http support
1..13

Maybe you want AC_PROG_GREP?  That picks the gnu grep in /usr/local,
but plumbing it in is more involved.

-- 
Darren Tucker (dtucker at dtucker.net)
GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860  37F4 9357 ECEF 11EA A6FA (new)
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.

  reply	other threads:[~2020-05-18 14:30 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-18 10:03 [PATCH 1/7] Redirect grep's stderr top null too Darren Tucker
2020-05-18 10:03 ` [PATCH 2/7] Define NO_PREAD for HPUX 11.11 and 11.00 Darren Tucker
2020-05-18 10:03 ` [PATCH 3/7] Test for strtoull in configure Darren Tucker
2020-05-18 10:03 ` [PATCH 4/7] Use strtoumax instead of strtoull Darren Tucker
2020-05-18 18:29   ` Junio C Hamano
2020-05-18 10:03 ` [PATCH 5/7] Define LLONG_MAX/MIN etc if not already defined Darren Tucker
2020-05-18 10:24   ` Andreas Schwab
2020-05-18 14:41     ` Darren Tucker
2020-05-18 10:03 ` [PATCH 6/7] Check if strtoumax is a macro (eg HP-UX 11.11) Darren Tucker
2020-05-18 17:17   ` Junio C Hamano
2020-05-20  1:49     ` Darren Tucker
2020-05-20  3:19       ` Junio C Hamano
2020-05-18 10:03 ` [PATCH 7/7] Define SCNuMAX if not already defined Darren Tucker
2020-05-18 14:13 ` [PATCH 1/7] Redirect grep's stderr top null too Đoàn Trần Công Danh
2020-05-18 14:29   ` Darren Tucker [this message]
2020-05-18 15:30     ` Đoàn Trần Công Danh
2020-05-18 23:22       ` Darren Tucker
2020-05-19  0:56         ` [PATCH] t5703: replace "grep -a" usage by perl Đoàn Trần Công Danh
2020-05-19  2:22           ` Darren Tucker
2020-05-19  7:13           ` Christian Couder
2020-05-19 11:39             ` Đoàn Trần Công Danh
2020-05-19 14:13               ` Christian Couder
2020-05-19 16:09       ` [PATCH 1/7] Redirect grep's stderr top null too Eric Sunshine
2020-05-18 18:20 ` Junio C Hamano

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='CALDDTe13_utn7E+QF1AgndX_6nPph=Gr1hesLwfV8e9LwgUPOQ@mail.gmail.com' \
    --to=dtucker@dtucker.net \
    --cc=congdanhqx@gmail.com \
    --cc=git@vger.kernel.org \
    /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).