Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'maint'
author
Junio C Hamano
<junkio@cox.net>
Fri, 16 Feb 2007 01:13:15 +0000
(17:13 -0800)
committer
Junio C Hamano
<junkio@cox.net>
Fri, 16 Feb 2007 01:13:15 +0000
(17:13 -0800)
* maint:
pretend-sha1: grave bugfix.
sha1_file.c
patch
|
blob
|
history
raw
(from parent 1:
78e90f8
)
diff --git
a/sha1_file.c
b/sha1_file.c
index b83f59f38320b349fa873f0505e74ae2ba75a99b..2c870314d525ba0666470d53cf7901a2bac9e3c0 100644
(file)
--- a/
sha1_file.c
+++ b/
sha1_file.c
@@
-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;