diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-09 17:09:34 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-09 17:09:34 -0700 |
commit | d6d3f9d0125a7215f3cdc2600b2307ca55b69536 (patch) | |
tree | a869cb0789d8ad87f04d28dd9b703f3ff343a4a7 /read-cache.c | |
parent | 4e6616ab77ed6a53f857d4b1082c4dc4140f34f5 (diff) | |
download | git-d6d3f9d0125a7215f3cdc2600b2307ca55b69536.tar.gz git-d6d3f9d0125a7215f3cdc2600b2307ca55b69536.tar.xz |
This implements the new "recursive tree" write-tree.
It's got some debugging printouts etc still in it, but testing on the
kernel seems to show that it does indeed fix the issue with huge tree
files for each commit.
Diffstat (limited to 'read-cache.c')
-rw-r--r-- | read-cache.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/read-cache.c b/read-cache.c index ac8375a7f..91b2628e3 100644 --- a/read-cache.c +++ b/read-cache.c @@ -168,7 +168,7 @@ void * read_sha1_file(unsigned char *sha1, char *type, unsigned long *size) return NULL; } -int write_sha1_file(char *buf, unsigned len) +int write_sha1_file(char *buf, unsigned len, unsigned char *returnsha1) { int size; char *compressed; @@ -199,7 +199,8 @@ int write_sha1_file(char *buf, unsigned len) if (write_sha1_buffer(sha1, compressed, size) < 0) return -1; - printf("%s\n", sha1_to_hex(sha1)); + if (returnsha1) + memcpy(returnsha1, sha1, 20); return 0; } |