git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Question: libxdiff: text-patches: internal format

From
René Scharfe <l.s.r@web.de>
Date
Mar 23, 2017, 19:30 UTC
Message-ID
<e19893df-0f7c-cfa7-cca4-014630ccf908@web.de>
In-Reply-To
<20170323180026.7qdfdzqgyczt2s3f@darkstar>
Am 23.03.2017 um 19:00 schrieb matthew@giassa.net:
Show 15 quoted lines
> Hi there,
>
> Following up on an earlier question of mine from yesterday, is there any
> formal documentation (save for source diving) on the internal format
> used by libxdiff/xdiff when it generates a patch by comparing two
> plaintext files?
>
> I'd like to generate a human-readable "pretty" diff from the output
> generated by libxdiff, and while the suggestion by Stefan yesterday is a
> good idea (ie: go through diff.c), I'm trying to see if there's a
> quicker way to pull this off. Also, I can't determine if lifting that
> code from git would invoke LGPL licensing constraints (no problem), or
> GPL licensing constraints (incompatible with my application). If the
> format is easy enough to follow, I might just write my own parser,
> provided it's a trivial task.

Some of your questions may be answered on the homepage of LibXDiff, http://www.xmailserver.org/xdiff-lib.html. That's the original version that was imported into Git long ago. It lacks some Git-specific features, but the documentation and links on the web page may still help you. The original LibXDiff is licensed under the LGPL and perhaps you can use it directly already.

René
Previous: matthew@giassa.net
Message 2 of 2 in “Question: libxdiff: text-patches: internal format”
  1. matthew@giassa.netMar 23, 2017
  2. René ScharfeMar 23, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.