Re: [PATCH 1/3] diff_tree_sha1(): avoid rereading trees if possible
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Dec 10, 2006, 22:49 UTC
- Message-ID
- <Pine.LNX.4.63.0612102347480.28348@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <7vvekk5xpc.fsf@assigned-by-dhcp.cox.net>
Hi,
On Sat, 9 Dec 2006, Junio C Hamano wrote:
Show 8 quoted lines
> I think this is overkill that only helps a very narrow "empty tree" > special case that [PATCH 2/3] addresses, and can be easily and > incorrectly abused. We do not want people to expect that reading many > trees from different revisions as "struct tree" objects and keeping all > of them in memory would magically speed up diff-tree, for example. > > I'd prefer write_sha1_file() approach in Shawn's patch for its > simplicity at least for now.
Okay, after thinking about it, I agree. merge-recursive is really the only user for such a diff. So, I do not think EMPTY_TREE would be useful.
Ciao, Dscho