Thread (10 messages) flat view 10 messages, 5 authors, 2016-06-15

Re: git log -z doesn't separate commits with NULs

From: Nikolaj Shurkaev <hidden>
Date: 2016-06-15 22:53:08

Hello.

You were right. I added parameter --max-args=1 to xargs command and that 
started work as I wanted initially.
Thank you very much.

--
Nikolaj

23.02.2012 13:17, Johannes Sixt пишет:
Am 23.02.2012 10:14, schrieb Nikolaj Shurkaev:
quoted
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.
That is because xargs calls the program with as many arguments as
possible, unless directed otherwise. Put this in the script:

	echo "started $*"

and repeat. Then try this:

  ... | xargs -0 -n 1 ~/1.sh

-- Hannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help