[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Fixing merge - Subtree, Cyclic, and Tree Change cases

From: Peter Samuelson <peter_at_p12n.org>
Date: Mon, 18 Jul 2011 15:15:43 -0500

> On Sun, Jul 17, 2011 at 6:03 PM, Andy Singleton <andy_at_assembla.com> wrote:
> > TREE CHANGE
> >
> > We can identify tree changes by pattern matching.  This is the same tactic
> > that git uses, without any other tree change tracking.

[Paul Burba]
> Could you provide a bit more explanation of what you mean here? For
> those of us not familiar with the inner workings of git.

I'm not terribly familiar with git internals, but I think what he's
getting at is that git does not track tree changes, but instead,
_deduces_ tree changes from changesets. If, within a single commit,
one file disappears and another file appears with similar content, git
interprets, after the fact, as a move.

There are several ramifications. One, I'm not sure how well this works
if the delete and the add are in separate commits - i.e., a file is
resurrected from history. Maybe that is tracked in some other way.

Two, git attempts to reconstruct _content_ moves, not just tree moves.
That is, if a significant chunk of a file (say, a function) disappears
and reappears in another file, this is tracked as well, even if it's
not the whole file. So, a file rename is really just a special case of
content moving between files.

Note that the complexity of this approach (deducing content moves after
the fact, rather than tracking tree changes) scales by the size of the
commit, not the size of the tree. So the assumption is that even in
large trees, any given commit is relatively limited in scope.

-- 
Peter Samuelson | org-tld!p12n!peter | http://p12n.org/
Received on 2011-07-18 22:16:32 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.