From: Junio C Hamano Date: Tue, 10 May 2011 23:11:22 GMT Subject: Re: [PATCH] fix overslow :/no-such-string-ever-existed diagnostics Message-ID: <7v4o52i21x.fsf@alter.siamese.dyndns.org> In-Reply-To: Matthieu Moy writes: > Is this a complement or an alternative? It seems to me that your other > patch makes this first one useless (in the sense that the second call is > always cheap), and avoids complexifying the code of get_sha1_with_mode_1 > for the first call. I think that the get_sha1_with_mode_1() that is sprinkled with the "gently" conditional everywhere _is_ the primary source of complexity. I suspect that if 009fee4 did a proper refactoring, get_sha1_with_mode() wouldn't have that "gently" option at all, and the die_verify_filename() wouldn't call get_sha1_with_mode(). Instead, they would share same set of helper functions and the latter would make a few calls to them, only to deal with : and : cases.