{"thread":{"id":"45486","subject":"Question: libxdiff: text-patches: internal format","startedAt":"2017-03-23T18:00:33Z","lastAt":"2017-03-23T19:30:58Z","messageCount":2,"participants":["matthew@giassa.net","René Scharfe"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"315132","messageId":"20170323180026.7qdfdzqgyczt2s3f@darkstar","threadId":"45486","inReplyTo":null,"subject":"Question: libxdiff: text-patches: internal format","fromName":"","fromEmail":"matthew@giassa.net","sentAt":"2017-03-23T18:00:26Z","receivedAt":"2017-03-23T18:00:33Z","isPatch":false,"sender":{"key":"matthew@giassa.net","avatar":null},"body":"Hi there,\n\nFollowing up on an earlier question of mine from yesterday, is there any\nformal documentation (save for source diving) on the internal format\nused by libxdiff/xdiff when it generates a patch by comparing two\nplaintext files?\n\nI'd like to generate a human-readable \"pretty\" diff from the output\ngenerated by libxdiff, and while the suggestion by Stefan yesterday is a\ngood idea (ie: go through diff.c), I'm trying to see if there's a\nquicker way to pull this off. Also, I can't determine if lifting that\ncode from git would invoke LGPL licensing constraints (no problem), or\nGPL licensing constraints (incompatible with my application). If the\nformat is easy enough to follow, I might just write my own parser,\nprovided it's a trivial task.\n\nThank you.\n\n-- \nMatthew Giassa\ne: matthew@giassa.net\n\n"},{"id":"315155","messageId":"e19893df-0f7c-cfa7-cca4-014630ccf908@web.de","threadId":"45486","inReplyTo":"20170323180026.7qdfdzqgyczt2s3f@darkstar","subject":"Re: Question: libxdiff: text-patches: internal format","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2017-03-23T19:30:41Z","receivedAt":"2017-03-23T19:30:58Z","isPatch":false,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Am 23.03.2017 um 19:00 schrieb matthew@giassa.net:\n> Hi there,\n>\n> Following up on an earlier question of mine from yesterday, is there any\n> formal documentation (save for source diving) on the internal format\n> used by libxdiff/xdiff when it generates a patch by comparing two\n> plaintext files?\n>\n> I'd like to generate a human-readable \"pretty\" diff from the output\n> generated by libxdiff, and while the suggestion by Stefan yesterday is a\n> good idea (ie: go through diff.c), I'm trying to see if there's a\n> quicker way to pull this off. Also, I can't determine if lifting that\n> code from git would invoke LGPL licensing constraints (no problem), or\n> GPL licensing constraints (incompatible with my application). If the\n> format is easy enough to follow, I might just write my own parser,\n> provided it's a trivial task.\n\nSome of your questions may be answered on the homepage of LibXDiff, \nhttp://www.xmailserver.org/xdiff-lib.html.  That's the original version \nthat was imported into Git long ago.  It lacks some Git-specific \nfeatures, but the documentation and links on the web page may still help \nyou.  The original LibXDiff is licensed under the LGPL and perhaps you \ncan use it directly already.\n\nRené\n"}]}