git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Request for Help - Too many perl arguments as of 2.43.0-rc0

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 4, 2023, 07:59 UTC
Message-ID
<xmqq8r7egd8u.fsf@gitster.g>
In-Reply-To
<CAPig+cQpxRQnhffR8EWWRhqJPmOeOuCE3qsuMcnDyuMLLbTH8Q@mail.gmail.com>
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
Previous: Eric SunshineNext: Eric Sunshine
Message 7 of 12 in “Request for Help - Too many perl arguments as of 2.43.0-rc0”
  1. rsbecker@nexbridge.comNov 3, 2023
  2. Eric SunshineNov 3, 2023
  3. rsbecker@nexbridge.comNov 3, 2023
  4. Eric SunshineNov 3, 2023
  5. rsbecker@nexbridge.comNov 3, 2023
  6. Eric SunshineNov 4, 2023
  7. Junio C HamanoNov 4, 2023
  8. Eric SunshineNov 4, 2023
  9. Jeff KingNov 4, 2023
  10. rsbecker@nexbridge.comNov 4, 2023
  11. Eric SunshineNov 5, 2023
  12. Jeff KingNov 5, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.