Here is an attempt at making a format agnostic structured output library. The idea being that the command doing the output doesn't have to care what the actual output format is, it just uses the abstract notion of objects and arrays. The current backend/frontend interface probably needs expanding so that a less noddy XML output can be used, but it's a start. Rather than building an in-memory structure and then writing it out I've gone for the approach of writing out immediately. The thought behind this was that I didn't really want to force commands like log to have to wait 'til the end to start outputting information. The JSON output is formatted differently from my previous JSON-only status modification, but the actual information output is the same (i.e. the output of a json parser should be identical ignoring item ordering in objects). Julian Phillips (3): strbuf: Add strbuf_vaddf function add a library of code for producing structured output status: add support for structured output Makefile | 3 + builtin/commit.c | 12 +++ output-json.c | 128 ++++++++++++++++++++++++++++++++ output-xml.c | 68 +++++++++++++++++ output.c | 212 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ output.h | 71 ++++++++++++++++++ strbuf.c | 13 +++- strbuf.h | 1 + wt-status.c | 73 +++++++++++++++++++ wt-status.h | 2 + 10 files changed, 581 insertions(+), 2 deletions(-) create mode 100644 output-json.c create mode 100644 output-xml.c create mode 100644 output.c create mode 100644 output.h -- 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