From: Junio C Hamano Date: Fri, 25 Jan 2008 19:07:46 GMT Subject: Re: I'm a total push-over.. Message-ID: <7v63xh7mgt.fsf@gitster.siamese.dyndns.org> In-Reply-To: <87abmtvkd8.fsf@jbms.ath.cx> Jeremy Maitin-Shepard writes: > In theory, I agree that this is possible, but in practice it may not be > reasonable at all. Consider two possible comparison functions: > > 1. compare file names as strings case-insensitively assuming a latin 1 > encoding > > 2. compare file names as strings case-insensitively assuming a UTF-8 > encoding > > Actually writing a hash function such that two strings hash to the same > value if either of these comparison functions says that the strings are > equal would appear to be rather difficult. Once you start adding more "case folding" supported filesystems to the repertoire, such a unified hash function Dscho suggests needs to throw paths that other (N-1) "case folding" filesystems treat as distinct but only 1 filesystem treats "equivalent" into the same hash bucket. I would say not just difficult but the resulting function would have too many collisions to make it ineffective.