From: Nguyen Thai Ngoc Duy Date: Thu, 23 Apr 2009 10:07:19 GMT Subject: Re: [PATCH] tests: remove xargs in favor of --stdin where possible Message-ID: In-Reply-To: <7vfxfzwytx.fsf@gitster.siamese.dyndns.org> 2009/4/23 Junio C Hamano : > Nguyễn Thái Ngọc Duy   writes: > >> Signed-off-by: Nguyễn Thái Ngọc Duy >> --- >>  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). > 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