From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff King Subject: Re: t3010 broken by 2eac2a4 Date: Fri, 23 Aug 2013 14:51:58 -0400 Message-ID: <20130823185158.GC30130@sigill.intra.peff.net> References: <7vsiy1j7dd.fsf@alter.siamese.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: Eric Sunshine , Brian Gernhardt , "git@vger.kernel.org List" To: Junio C Hamano X-From: git-owner@vger.kernel.org Fri Aug 23 20:52:22 2013 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VCwT2-0005gQ-Gu for gcvg-git-2@plane.gmane.org; Fri, 23 Aug 2013 20:52:16 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755633Ab3HWSwC (ORCPT ); Fri, 23 Aug 2013 14:52:02 -0400 Received: from cloud.peff.net ([50.56.180.127]:39437 "EHLO peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754659Ab3HWSwB (ORCPT ); Fri, 23 Aug 2013 14:52:01 -0400 Received: (qmail 14537 invoked by uid 102); 23 Aug 2013 18:52:01 -0000 Received: from c-71-63-4-13.hsd1.va.comcast.net (HELO sigill.intra.peff.net) (71.63.4.13) (smtp-auth username relayok, mechanism cram-md5) by peff.net (qpsmtpd/0.84) with ESMTPA; Fri, 23 Aug 2013 13:52:01 -0500 Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Fri, 23 Aug 2013 14:51:58 -0400 Content-Disposition: inline In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Fri, Aug 23, 2013 at 10:15:55AM -0700, Junio C Hamano wrote: > When 5102c617 (Add case insensitivity support for directories when > using git status, 2010-10-03) added the directories to the name-hash > with trailing slash, there was only a single name hash table to > which both real cache entries and leading directory prefixes are > registered, so it made some sense to register them with trailing > slashes so that we can tell what kind of entry is being returned. > > But since 2092678c (name-hash.c: fix endless loop with > core.ignorecase=true, 2013-02-28), these directory entries that are > not the cache entries are kept track of in a separate hashtable, > which makes me wonder if it still makes sense to register > directories with trailing slashes. > > And if we stop doing that (and instead if we shrunk the namelen when > an unconverted caller asks for a name with a trailing slash to see > if a directory exists in the index), wouldn't it automatically fix > the directory_exists_in_index_icase()? It does not need to assume > that dirname[len] has '/'; after all, it may not even be a valid > memory location in the first place. Yeah, I think that is sane overall direction. When I did the sketch that eventually turned into Karsten's 2092678c, that was one of the goals. But I did not keep up with his response and the final patch, and I'm not sure if the slashes still serve some function. So it would definitely need somebody looking carefully at the current logic. More details are in this sub-thread: http://thread.gmane.org/gmane.comp.version-control.git/215820/focus=216284 -Peff