diff options
author | Vicent Marti <vicent@github.com> | 2014-01-14 10:27:42 -0800 |
---|---|---|
committer | Vicent Marti <vicent@github.com> | 2014-01-14 10:27:42 -0800 |
commit | 0d5d0ea8806cd3d63c3aea6933553ec23920f5a5 (patch) | |
tree | d66c68a786fe8b71462dd196cecee11c224e09e8 /src/indexer.c | |
parent | be29dd82e27d3536b9c63f5835b102b28934555e (diff) | |
parent | 52a8a130728e29d8ac9d6e4f9e3a7017afe461fb (diff) | |
download | libgit2-0d5d0ea8806cd3d63c3aea6933553ec23920f5a5.tar.gz |
Merge pull request #2004 from ethomson/pack_stream
Stream packs to the destination
Diffstat (limited to 'src/indexer.c')
-rw-r--r-- | src/indexer.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/indexer.c b/src/indexer.c index 6132571cc..ccab8fcf0 100644 --- a/src/indexer.c +++ b/src/indexer.c @@ -5,8 +5,6 @@ * a Linking Exception. For full terms see the included COPYING file. */ -#include <zlib.h> - #include "git2/indexer.h" #include "git2/object.h" @@ -18,7 +16,7 @@ #include "filebuf.h" #include "oid.h" #include "oidmap.h" -#include "compress.h" +#include "zstream.h" #define UINT31_MAX (0x7FFFFFFF) @@ -662,7 +660,7 @@ static int inject_object(git_indexer *idx, git_oid *id) idx->pack->mwf.size += hdr_len; entry->crc = crc32(entry->crc, hdr, hdr_len); - if ((error = git__compress(&buf, data, len)) < 0) + if ((error = git_zstream_deflatebuf(&buf, data, len)) < 0) goto cleanup; /* And then the compressed object */ |