git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] tests: remove xargs in favor of --stdin where possible
Date: Thu, 23 Apr 2009 11:22:20 +0200	[thread overview]
Message-ID: <49F0334C.6000004@viscovery.net> (raw)
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

  reply	other threads:[~2009-04-23  9:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-23  6:31 [PATCH] tests: remove xargs in favor of --stdin where possible Nguyễn Thái Ngọc Duy
2009-04-23  8:36 ` Junio C Hamano
2009-04-23  9:22   ` Johannes Sixt [this message]
2009-04-23 10:07   ` Nguyen Thai Ngoc Duy
2009-04-23 10:25     ` Junio C Hamano
2009-04-23 23:22       ` Nguyen Thai Ngoc Duy

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=49F0334C.6000004@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.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 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).