Re: [PATCH] Introduce SHA1_FILE_DIRECTORIES
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.
Show 10 quoted lines
> 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