Re: Merge with git-pasky II.
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Apr 15, 2005, 20:45 UTC
- Message-ID
- <Pine.LNX.4.58.0504151334350.7211@ppc970.osdl.org>
- In-Reply-To
- <7vr7hbhky9.fsf@assigned-by-dhcp.cox.net>
On Fri, 15 Apr 2005, Junio C Hamano wrote:
Show 5 quoted lines
> > I was looking at merge-tree.c last night to add recursive > behaviour (my favorite these days ;-) to it [*1*]. > > But then I started thinking.
Always good.
Show 13 quoted lines
> LT> ... For each entry in the directory it says either > LT> select <mode> <sha1> path > LT> or > LT> merge <mode>-><mode>,<mode> <sha1>-><sha1>,<sha1> path > LT> depending on whether it could directly select the right object or not. > > Given that the case you are primarily interested in is the one > that affects only small parts of a huge tree (i.e. common kernel > merge pattern I understand from your previous messages), your > "hacky version" [*2*], extended for recursive operation, would > spit out 98% select and 2% merge, and probably the origin of > these selects are distributed across ancestor=90%, his=4%, > my=4%, or something similar. Am I misestimating grossly?
No. That's _exactly_ right. You do not want a recursive merge-tree.
The "diff-tree" thing is different, exactly because it prunes out all the differences early on.
> I am thinking about: > > - adding recursive behaviour (I am almost done with this);
I think your suggestion sounds perfectly reasonable.
Linus