From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Barkalow Subject: Re: [PATCH 5/6] Do linear-time/space rename logic for exact renames Date: Thu, 25 Oct 2007 15:43:46 -0400 (EDT) Message-ID: References: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Junio C Hamano , Git Mailing List To: Linus Torvalds X-From: git-owner@vger.kernel.org Thu Oct 25 21:44:09 2007 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1Il8cd-0000KA-0x for gcvg-git-2@gmane.org; Thu, 25 Oct 2007 21:44:03 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752719AbXJYTnt (ORCPT ); Thu, 25 Oct 2007 15:43:49 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752477AbXJYTnt (ORCPT ); Thu, 25 Oct 2007 15:43:49 -0400 Received: from iabervon.org ([66.92.72.58]:44355 "EHLO iabervon.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752719AbXJYTnt (ORCPT ); Thu, 25 Oct 2007 15:43:49 -0400 Received: (qmail 10604 invoked by uid 1000); 25 Oct 2007 19:43:46 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 25 Oct 2007 19:43:46 -0000 In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: > +/* > + * Insert a new hash entry pointer into the table. > + * > + * If that hash entry already existed, return the pointer to > + * the existing entry (and the caller can create a list of the > + * pointers or do anything else). If it didn't exist, return > + * NULL (and the caller knows the pointer has been inserted). > + */ Creating a list of the pointers doesn't work correctly with the grow implementation, because growing the hash may turn a collision into a non-collision, at which point items other than the first cannot be found (since they're listed inside a bucket that's now wrong for them). AFAIK, resizing a hash table requires being able to figure out what happened with collisions. -Daniel *This .sig left intentionally blank*