Re: Merge with git-pasky II.
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Apr 15, 2005, 12:03 UTC
- Message-ID
- <Pine.LNX.4.58.0504151340221.27162@wgmdd8.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <1113556448.12012.269.camel@baythorne.infradead.org>
Hi,
On Fri, 15 Apr 2005, David Woodhouse wrote:
Show 7 quoted lines
> On Thu, 2005-04-14 at 11:36 -0700, Linus Torvalds wrote: > > And "merge these two trees" (which works on a _tree_ level) > > or "find the common commit" (which works on a _commit_ level) > > I suspect that finding the common commit is actually a per-file thing; > it's not just something you do for the _commit_ graph, then use for > merging each file in the two branches you're trying to merge.
I disagree. In order to be trusted, this thing has to catch the following scenario:
Skywalker and Solo start from the same base. They commit quite a lot to their trees. In between, Skywalker commits a tree, where the function "kazoom()" has been added to the file "deathstar.c", but Solo also added this function, but to the file "moon.c". A file-based merge would have no problem merging each file, such that in the end, "kazoom()" is defined twice.
The same problems arise when one tries to merge line-wise, i.e. when for each line a (possibly different) merge-parent is sought.
The concept here is a *transaction*: when going from one tree to the next tree via a commit, a sort of integrity is maintained, which is breached when only looking at files and commits.
Ciao, Dscho