Re: maildir / read-tree trivial merging getting in the way?

From: Linus Torvalds <torvalds@osdl.org>
Date: 2006-02-14 13:36:21
On Mon, 13 Feb 2006, Junio C Hamano wrote:
> 
> That would be more naturally done by writing that thing in a
> more reasonable scripting language (not shell, but Perl or
> Python), call ls-tree three times, do whatever merge to come up
> with the final shape of the tree, and then construct the tree
> with a single invocation of "update-index --index-info", maybe
> even starting from an empty index file.

Exactly. Except that it probably makes sense to use "git-diff-tree" to try 
to avoid doing lots of unnecessary work in a script, if the normal case is 
that there's still a lot of stuff that hasn't changed.

So conceptually you would do three "git-ls-tree" invocations, but in 
_practice_ it's probably better to do just one "git-ls-tree", and then use 
"git-diff-tree" to basically generate the differences from that one 
ls-tree to the other cases of interest.

So start with the merge-base, for example, and then basically generate the 
"what changed" between the merge base and the two branch heads. 

That was the plan for doing merges initially, it just turned out that 
doing them in the index made things easier.

			Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Tue Feb 14 13:37:17 2006

This archive was generated by hypermail 2.1.8 : 2006-02-14 13:37:27 EST