Ok, round 2 of 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 uses one set of output functions and the user gets to choose their preferred output style. 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 (though I still haven't got around to working on converting log). 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. The XML patch still needs a lot of work, as I've been busy playing with the library API and the NORMAL/ZERO backends ... Julian Phillips (4): output: Add a new library for plumbing output ls-tree: complete conversion to using output library status: use output library for porcelain output output: WIP: Add XML backend Documentation/technical/api-output.txt | 116 ++++++++++++++ Makefile | 5 + builtin/commit.c | 21 +++- builtin/ls-tree.c | 51 ++++-- output-json.c | 127 +++++++++++++++ output-normal.c | 95 +++++++++++ output-xml.c | 68 ++++++++ output-zero.c | 74 +++++++++ output.c | 270 ++++++++++++++++++++++++++++++++ output.h | 93 +++++++++++ wt-status.c | 88 ++++++++++- wt-status.h | 3 +- 12 files changed, 985 insertions(+), 26 deletions(-) create mode 100644 Documentation/technical/api-output.txt create mode 100644 output-json.c create mode 100644 output-normal.c create mode 100644 output-xml.c create mode 100644 output-zero.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