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

storing pre-computed fine-grained diffs

From
Eecloud <shawn.t.rutledge@gmail.com>
Date
Mar 7, 2012, 23:41 UTC
Message-ID
<1331163703976-7353466.post@n2.nabble.com>

The thing about git, as well as all version control systems I have known so far which store diffs, is that computing the diff means post-analyzing a saved file. That is, you use any editor you like, and after making a whole batch of changes you manually commit to the repository, and the diff algorithm figures out what you changed. Some information is already lost about what order you made the changes and what the logical chunks actually were. But what if there was an editor that could save each individual change as a separate version? You put the cursor at one point in the file, and type some text; then you click elsewhere, and the editor does a "git commit this-file" automatically. Then you select some other text and delete it, and it does a commit again. It would be nice in that case to avoid doing the diff at all, because the editor already knows exactly what the change was. Would it be possible to store these fine-grained changes directly in a packfile, efficiently? Or would it require a different storage format? I know the diff algorithm used is already much smarter than a line-by-line diff, but is the storage format capable of representing changes over ranges of characters without "extra context" like the line-by-line diffs usually have?

-- View this message in context: http://git.661346.n2.nabble.com/storing-pre-computed-fine-grained-diffs-tp7353466p7353466.html Sent from the git mailing list archive at Nabble.com.

Next: David Barr
Message 1 of 2 in “storing pre-computed fine-grained diffs”
  1. ecloudMar 7, 2012
  2. David BarrMar 8, 2012

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.