Re: [PATCH 08/10] cat-file: split --batch input lines on whitespace

2013-07-11 Thread Junio C Hamano
Jeff King writes: > On Wed, Jul 10, 2013 at 08:59:51PM +0530, Ramkumar Ramachandra wrote: > >> Jeff King wrote: >> > git rev-list --objects HEAD | >> > git cat-file --batch-check='%(objectsize) %(text)' >> >> If anything, I would have expected %(rest), not %(text). This atom is >> specific

Re: [PATCH 08/10] cat-file: split --batch input lines on whitespace

2013-07-11 Thread Jeff King
On Wed, Jul 10, 2013 at 08:59:51PM +0530, Ramkumar Ramachandra wrote: > Jeff King wrote: > > git rev-list --objects HEAD | > > git cat-file --batch-check='%(objectsize) %(text)' > > If anything, I would have expected %(rest), not %(text). This atom is > specific to commands that accept input

Re: [PATCH 08/10] cat-file: split --batch input lines on whitespace

2013-07-10 Thread Ramkumar Ramachandra
Jeff King wrote: > git rev-list --objects HEAD | > git cat-file --batch-check='%(objectsize) %(text)' If anything, I would have expected %(rest), not %(text). This atom is specific to commands that accept input via stdin (i.e. not log, f-e-r, branch, or anything else I can think of). Also, t

[PATCH 08/10] cat-file: split --batch input lines on whitespace

2013-07-10 Thread Jeff King
If we get an input line to --batch or --batch-check that looks like "HEAD foo bar", we will currently feed the whole thing to get_sha1(). This means that to use --batch-check with `rev-list --objects`, one must pre-process the input, like: git rev-list --objects HEAD | cut -d' ' -f1 | git ca