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

Re: [PATCH] tests: remove xargs in favor of --stdin where possible

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Apr 23, 2009, 10:07 UTC
Message-ID
<fcaeb9bf0904230307h2d4ee691y412e9cf31e4e90c3@mail.gmail.com>
In-Reply-To
<7vfxfzwytx.fsf@gitster.siamese.dyndns.org>
2009/4/23 Junio C Hamano <gitster@pobox.com>:
Show 14 quoted lines
> Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
>
>> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
>> ---
>>  Patch "Convert to use quiet option when available" reminds me I had a similar
>>  patch to remove (mostly) xargs usage from tests.
>
> The reason being...?
>
>  (1) xargs is not universally available, or portable enough?
>
>  (2) people may learn from tests, and we should demostrate our ability?
>
>  (3) something else?
I worked on busybox win32 port, less commands meant less work for me. So (1).
Show 5 quoted lines
> The tests may not break with your change because none of them may use
> problematic characters (especially "\n" and '"'), but update-index --stdin
> without -z is not suitable for reading from output from "find" without -0
> option (on the other hand, "update-index -z --stdin" is good for reading
> output from "find -0"; but for portability we avoid GNUism "find -0").

It can't be as safe as find -0| update-index -z, but it would be equivalent to find|xargs, isn't it? Both separate arguments by \n.

-- 
Duy
Previous: Johannes SixtNext: Junio C Hamano
Message 4 of 6 in “tests: remove xargs in favor of --stdin where possible”
  1. tests: remove xargs in favor of --stdin where possibleNguyễn Thái Ngọc Duy, Apr 23, 2009
  2. Junio C HamanoApr 23, 2009
  3. Johannes SixtApr 23, 2009
  4. Nguyen Thai Ngoc DuyApr 23, 2009
  5. Junio C HamanoApr 23, 2009
  6. Nguyen Thai Ngoc DuyApr 23, 2009

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.