From: Kenneth Johansson Date: Sun, 17 Apr 2005 23:53:14 GMT Subject: Re: Merge with git-pasky II. Message-ID: <4262F6EA.2010005@kenjo.org> In-Reply-To: <20050417233441.GU1461@pasky.ji.cz> Petr Baudis wrote: > Dear diary, on Mon, Apr 18, 2005 at 01:29:05AM CEST, I got a letter > where Herbert Xu told me that... > >>I get the feeling that it isn't that bad. For example, if we did it >>at the points where the blobs actually entered the tree, then the cost >>is always proportional to the change size (the number of new blobs). > > > No. The collision check is done in the opposite cache - when you want to > write a blob and there is already a file of the same hash in the tree. > So either the blob is already in the database, or you have a collision. > > Therefore, the cost is proportional to the size of what stays unchanged. > ?? now I'm confused. Surly the only cost involved is to never write over a file that already exist in the cache and that is already done NOW as far as I read the code. So there is NO extra cost in detecting an collision.