From: Sean Date: Sat, 07 May 2005 00:20:25 GMT Subject: Re: [PATCH] Introduce SHA1_FILE_DIRECTORIES Message-ID: <2637.10.10.10.24.1115425225.squirrel@linux1> In-Reply-To: <7vmzr8apxc.fsf@assigned-by-dhcp.cox.net> On Fri, May 6, 2005 7:35 pm, Junio C Hamano said: Hi Junio, > This is an implementation of the idea floated on the GIT list a couple > of days ago to archive really old history on a separate directory, even > on a read-only DVD ROM media. David Lang should get the credit for the idea. > int has_sha1_file(const unsigned char *sha1) > { > - char *filename = sha1_file_name(sha1); > struct stat st; > + char *filename = find_sha1_file(sha1); > + if (!filename) > + return 0; > > if (!stat(filename, &st)) > return 1; has_sha1_file can be reduced to: int has_sha1_file(const unsigned char *sha1) { return (!!find_sha1_file(sha1)); } Sean