On Fri, 16 Mar 2018 10:31:33 -0400
Dianne Skoll <d...@roaringpenguin.com> wrote:

> On Fri, 16 Mar 2018 10:26:36 -0400
> Shawn H Corey <shawnhco...@gmail.com> wrote:
> 
> > git ls-files -z | xargs -0 grep 'function_name'
> 
> > The -z separates the names with a ASCII NUL and the -0 (minus zero)
> > allows xarg to read them correctly. This is useful if the files have
> > spaces in their names.
> 
> Thank you, Git developers. :(
> 
> "find" uses -print0.  "xargs" uses -0.  So of *course* git-ls-files
> uses -z.  (And -0 isn't already being used for something else.)
> 
> Gaaaah.


Obligatory XKCD: https://xkcd.com/927/


-- 
Don't stop where the ink does.

        Shawn H Corey
_______________________________________________
Linux mailing list
Linux@lists.oclug.on.ca
http://oclug.on.ca/mailman/listinfo/linux

Reply via email to