From: Luke Diamand Date: Thu, 23 Feb 2012 10:02:31 GMT Subject: Re: git log -z doesn't separate commits with NULs Message-ID: <4F460EB7.3030503@diamand.org> In-Reply-To: <4F46036F.3040406@gmail.com> On 23/02/12 09:14, Nikolaj Shurkaev wrote: > Hello all. > > I wanted to generate several files with some statistics using "git log > -z" command. > I did something like this: > git log -z --patch HEAD~10..HEAD -- SomePathHere | xargs -0 > --max-chars=1000000 ~/1.sh > > If I put > echo "started" > into the file ~/1.sh I see that the file is called only once instead of > multiple times. > > I'm newbie to xargs, thus I tested with and that worked as I expected. > find . -type f -print0 | xargs -0 ./1.sh > That produced a lost of "started" lines. > > Thus I suspect there is a but in git log -z command and that doesn't > "Separate the commits with NULs instead of with new newlines." as > promised in the documents. > Is my understanding correct or I don't understand the documentation or > somehow pass wrong parameters into git log? Just a guess, but doesn't the "--patch" option to git log ask it to produce a patch output? Surely that will override the -z: patch will not be expecting NULs. > > Thank you. > Best regards, > Nikolaj > -- > To unsubscribe from this list: send the line "unsubscribe git" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html