git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: ecloud <shawn.t.rutledge@gmail.com>
To: git@vger.kernel.org
Subject: storing pre-computed fine-grained diffs
Date: Wed, 7 Mar 2012 15:41:43 -0800 (PST)	[thread overview]
Message-ID: <1331163703976-7353466.post@n2.nabble.com> (raw)

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.

             reply	other threads:[~2012-03-07 23:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-07 23:41 ecloud [this message]
2012-03-08  1:04 ` storing pre-computed fine-grained diffs David Barr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1331163703976-7353466.post@n2.nabble.com \
    --to=shawn.t.rutledge@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).