Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* maint:
  pretend-sha1: grave bugfix.
  • Loading branch information
Junio C Hamano committed Feb 16, 2007
2 parents 78e90f8 + efa13f7 commit af99711
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sha1_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1545,11 +1545,13 @@ int pretend_sha1_file(void *buf, unsigned long len, const char *type, unsigned c
co = &cached_objects[cached_object_nr++];
co->size = len;
co->type = strdup(type);
co->buf = xmalloc(len);
memcpy(co->buf, buf, len);
hashcpy(co->sha1, sha1);
return 0;
}

void * read_sha1_file(const unsigned char *sha1, char *type, unsigned long *size)
void *read_sha1_file(const unsigned char *sha1, char *type, unsigned long *size)
{
unsigned long mapsize;
void *map, *buf;
Expand Down

0 comments on commit af99711

Please sign in to comment.