All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: rsbecker@nexbridge.com,  Git List <git@vger.kernel.org>
Subject: Re: Request for Help - Too many perl arguments as of 2.43.0-rc0
Date: Sat, 04 Nov 2023 16:59:45 +0900	[thread overview]
Message-ID: <xmqq8r7egd8u.fsf@gitster.g> (raw)
In-Reply-To: <CAPig+cQpxRQnhffR8EWWRhqJPmOeOuCE3qsuMcnDyuMLLbTH8Q@mail.gmail.com> (Eric Sunshine's message of "Sat, 4 Nov 2023 02:36:48 -0400")

Eric Sunshine <sunshine@sunshineco.com> writes:

> Also, in the longer term, as you suggested, `xargs` is likely a more
> fruitful solution.

Hmph, the list of our test scripts exceed command line limit?  That
sounds a bit nasty, as we somehow need to prepare a pipe and feed
them into it, in order to drive xargs downstream of the pipe.


Ideally if there were a GNUMake function that slices a list into
sublists of "reasonable" lengths, we could use it to directly drive
N invocations of check-non-portable-shell script instead of xargs,
but I didn't find one.  Here is I came up with, using foreach that
is "slice the list into many sublists of 1 element", but it made me
feel dirty.

 t/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git c/t/Makefile w/t/Makefile
index 3e00cdd801..f9ac6bb4eb 100644
--- c/t/Makefile
+++ w/t/Makefile
@@ -122,7 +122,8 @@ test-lint-executable:
 		echo >&2 "non-executable tests:" $$bad; exit 1; }
 
 test-lint-shell-syntax:
-	@'$(PERL_PATH_SQ)' check-non-portable-shell.pl $(T) $(THELPERS) $(TPERF)
+	@{ $(foreach t,$(T) $(THELPERS) $(TPERF),echo "$t";) } | \
+	xargs '$(PERL_PATH_SQ)' check-non-portable-shell.pl
 
 test-lint-filenames:
 	@# We do *not* pass a glob to ls-files but use grep instead, to catch

  reply	other threads:[~2023-11-04  7:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-03 19:03 Request for Help - Too many perl arguments as of 2.43.0-rc0 rsbecker
2023-11-03 20:52 ` Eric Sunshine
2023-11-03 21:30   ` rsbecker
2023-11-03 21:50     ` Eric Sunshine
2023-11-03 22:04       ` rsbecker
2023-11-04  6:36         ` Eric Sunshine
2023-11-04  7:59           ` Junio C Hamano [this message]
2023-11-04 23:50             ` Eric Sunshine
2023-11-04 13:49           ` Jeff King
2023-11-04 14:55             ` rsbecker
2023-11-05  0:11             ` Eric Sunshine
2023-11-05  5:34               ` Jeff King

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=xmqq8r7egd8u.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=rsbecker@nexbridge.com \
    --cc=sunshine@sunshineco.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.