зеркало из https://github.com/microsoft/git.git
pretend-sha1: grave bugfix.
We stashed away objects that we pretend to have, but did not save the actual data. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Родитель
204d409247
Коммит
efa13f7b7e
|
@ -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 = &cached_objects[cached_object_nr++];
|
||||||
co->size = len;
|
co->size = len;
|
||||||
co->type = strdup(type);
|
co->type = strdup(type);
|
||||||
|
co->buf = xmalloc(len);
|
||||||
|
memcpy(co->buf, buf, len);
|
||||||
hashcpy(co->sha1, sha1);
|
hashcpy(co->sha1, sha1);
|
||||||
return 0;
|
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;
|
unsigned long mapsize;
|
||||||
void *map, *buf;
|
void *map, *buf;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче