Subject: Re: [RFC/PATCH v2 0/4] A new library for plumbing output

From: Jakub Narebski <[email-masked]>
Date: Wed, 14 Apr 2010 21:10:35 +0200

On Mon, 12 April 2010, Sverre Rabbelier wrote:
> 
> On Mon, Apr 12, 2010 at 01:21, Julian Phillips <[email-masked]> wrote:
> > Probably the biggest change from v1 is an expanded aim.  Now the output library
> > is aimed at controlling _all_ plubming output.  This series includes a patch for
> > ls-tree that has all it's output going through the library, and a patch for
> > status that has all the --porcelain output going through the library.
> 
> I like where this is going, a lot, especially since we don't have to
> convert everything in one go, but we can do it as desired, similar to
> optparsification. I still think more commands than just these two
> should be converted to validate the design though, perhaps something
> like 'git blame', or 'git for-each-ref'?

I don't think it is needed for either command.

'git blame' has --porcelain and --incremental output, which is line-based
and pretty much self-describing (with "header-name value" syntax for most
of it), and well documented.  JSON output would only add unnecessary
chatter and different quoting rules.

'git for-each-ref' has both --format=<format> to allow to get data what
one needs, and in the format one wants (with e.g. %00 to reresent NUL),
and [--shell|--perl|--python|--tcl] for placeholders in <format> to be
quoted as string literals suitable for specified host language.  Although
I am not sure if this option, meant to produce scriptlets, is used that
much/ note that there is not support for --json quoting, nor --xml 
escaping.

-- 
Jakub Narebski
Poland