Re: [RFC/PATCH v2 0/4] A new library for plumbing output (inc. current status)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Julian Phillips
Date: Sunday, April 18, 2010 - 2:46 pm

On Sat, 17 Apr 2010 10:00:53 -0400, Jeff King <peff@peff.net> wrote:
beginnings

Also, backends such as JSON want to know which things are strings, and
which are numbers - as they print differently.  An XML backend may want to
distinguish even more (though I guess that depends on the design).


It might help standardise the output between commands if there were helper
functions for some of the larger structures - e.g. commits.  Though I don't
think that those functions would be able to do legacy output, due to the
current lack of cross-command output compatibility.  I'm starting to see
this with blame and diff-tree (and family), where they both want to output
information about commits.

I think that maybe I need to design and document the output structure for
common concepts - so that it would be possible to pass the output from any
command to a common parser, with matching utility functions in the code. 
Though, I'm not sure if there actually are any common concepts that need
outputting apart from commits.

Current Status
--------------

I had been planning to post an updated series this weekend, but I'm too
tired to attempt tidying things up for posting at the moment ... If you
want to see the current state then my current mess is available at
http://git.q42.co.uk/w/output.git.

A quick summary of main changes since v2:
  - backends are now in a subdirectory
  - blame, diff-tree, have --ouptut=... support for plumbing output
  - log has some support for --ouput=...
  - output library has extended API, including quoted strings and
is_structured_output function
  - backend API includes explicit functions for top-level items

-- 
Julian
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC/PATCH v2 0/4] A new library for plumbing output, Julian Phillips, (Sun Apr 11, 4:21 pm)
Re: [RFC/PATCH v2 0/4] A new library for plumbing output, Sverre Rabbelier, (Sun Apr 11, 4:35 pm)
Re: [RFC/PATCH v2 0/4] A new library for plumbing output, Jakub Narebski, (Wed Apr 14, 12:10 pm)
Re: [RFC/PATCH v2 0/4] A new library for plumbing output, Sverre Rabbelier, (Wed Apr 14, 12:13 pm)
Re: [RFC/PATCH v2 0/4] A new library for plumbing output, Junio C Hamano, (Wed Apr 14, 12:32 pm)
Re: [RFC/PATCH v2 0/4] A new library for plumbing output, Jakub Narebski, (Wed Apr 14, 1:12 pm)
Re: [RFC/PATCH v2 0/4] A new library for plumbing output, Junio C Hamano, (Wed Apr 14, 1:38 pm)
Re: [RFC/PATCH v2 0/4] A new library for plumbing output, Julian Phillips, (Wed Apr 14, 1:57 pm)
Re: [RFC/PATCH v2 0/4] A new library for plumbing output, Jakub Narebski, (Wed Apr 14, 2:16 pm)
Re: [RFC/PATCH v2 0/4] A new library for plumbing output, Julian Phillips, (Wed Apr 14, 2:28 pm)
Re: [RFC/PATCH v2 0/4] A new library for plumbing output, Jakub Narebski, (Wed Apr 14, 2:29 pm)
Re: [RFC/PATCH v2 0/4] A new library for plumbing output, Junio C Hamano, (Wed Apr 14, 2:34 pm)
Re: [RFC/PATCH v2 0/4] A new library for plumbing output, Jakub Narebski, (Wed Apr 14, 2:42 pm)
Re: [RFC/PATCH v2 0/4] A new library for plumbing output, Jakub Narebski, (Thu Apr 15, 2:07 am)
Re: [RFC/PATCH v2 0/4] A new library for plumbing output, Jakub Narebski, (Sat Apr 17, 6:02 am)
Re: [RFC/PATCH v2 0/4] A new library for plumbing output ( ..., Julian Phillips, (Sun Apr 18, 2:46 pm)