On Sun, Jul 07, 2013 at 10:49:46AM -0700, Junio C Hamano wrote: > Jeff King <peff@xxxxxxxx> writes: > > > Perhaps we need > > > > git cat-file --batch-format="%(disk-size) %(object)" > > > > or similar. > > I agree with your reasoning. It may be simpler to give an interface > to ask for which pieces of info, e.g. --batch-cols=size,disksize, > without giving the readers a flexible "format". I started on this, and it turned out not to really be any simpler. In particular there is the question of whether git cat-file --batch-cols=size,type is different from git cat-file --batch-cols=type,size If so, then you are basically implementing the equivalent of a macro format anyway (you have to parse it left to right to know the order). And if not, you end up translating the column list into a bit-field, and the boilerplate for adding a new item is about the same as for a macro format. So I went ahead with the full formats for my re-roll. It turned out pretty reasonable, I think. -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html