From: Junio C Hamano Date: Sat, 07 May 2005 00:24:52 GMT Subject: Re: [PATCH] Introduce SHA1_FILE_DIRECTORIES Message-ID: <7vis1vc27f.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <2637.10.10.10.24.1115425225.squirrel@linux1> >>>>> "S" == Sean writes: S> has_sha1_file can be reduced to: S> int has_sha1_file(const unsigned char *sha1) S> { S> return (!!find_sha1_file(sha1)); S> } Not really. If you do not have alternates it does not even bother to stat so you get the path that supposed to contain the data and you need to do the checking yourself.