Re: [RFC/PATCH v2 0/4] A new library for plumbing output
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Apr 14, 2010, 21:16 UTC
- Message-ID
- <201004142316.07947.jnareb@gmail.com>
- In-Reply-To
- <80f140cdddc016f9b4608d79f1bc3722@212.159.54.234>
On Wed, 14 Apr 2010, Julian Phillips wrote:
> On Wed, 14 Apr 2010 21:10:35 +0200, Jakub Narebski <jnareb@gmail.com> > wrote:
Show 8 quoted lines
> > '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. > > That depends really. If you are writing something to parse the output, > and you already have a JSON parser available then it's the current output > that has different quoting rules. ;)
True.
> > Anyway, I have already converted blame to use the library for both > --porcelain and --incremental output, so it'll be in the next version of > the patch series. So you can try before you buy ...
Nice.
How did you managed to work with a bit non-standard rules of --porcelain format, namely maybe-quoting of filenames, and that not all lines conform to "<header> SP <value> LF" syntax: group definition begins with SHA-1, and contents is indented with TAB?
-- Jakub Narebski Poland