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
Johannes Sixt <j.sixt@viscovery.net>
Date
Apr 23, 2009, 09:22 UTC
Message-ID
<49F0334C.6000004@viscovery.net>
In-Reply-To
<7vfxfzwytx.fsf@gitster.siamese.dyndns.org>
Junio C Hamano schrieb:
> 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

Why should this be so? I thought I need -0/-z only if there are "\n" in file names (and I specifially talk about a find | update-index pipeline).

> (on the other hand, "update-index -z --stdin" is good for reading
> output from "find -0"; but for portability we avoid GNUism "find -0").

Sure, -0/-z is safer and to be used in scripts. But for an ad-hoc command that I type on the command line, why should I use -0/-z if I know that I don't have any "\n" in my file names?

-- Hannes
Previous: Junio C HamanoNext: Nguyen Thai Ngoc Duy
Message 3 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.