mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 17:05:49 +00:00
Use Z_BEST_SPEED for filebuf deflating
This is what Git uses by default for all deflating.
This commit is contained in:
parent
fff036ec15
commit
a6359408a5
@ -178,7 +178,7 @@ int git_filebuf_open(git_filebuf *file, const char *path, int flags)
|
||||
if (flags & GIT_FILEBUF_DEFLATE_CONTENTS) {
|
||||
|
||||
/* Initialize the ZLib stream */
|
||||
if (deflateInit(&file->zs, Z_DEFAULT_COMPRESSION) != Z_OK) {
|
||||
if (deflateInit(&file->zs, Z_BEST_SPEED) != Z_OK) {
|
||||
error = GIT_EZLIB;
|
||||
goto cleanup;
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ BEGIN_TEST(write2, "write a tree from a memory")
|
||||
git_tree *tree;
|
||||
git_oid id, bid, rid, id2;
|
||||
|
||||
must_pass(git_repository_open(&repo, REPOSITORY_FOLDER));
|
||||
must_pass(open_temp_repo(&repo, REPOSITORY_FOLDER));
|
||||
git_oid_mkstr(&id, first_tree);
|
||||
git_oid_mkstr(&id2, second_tree);
|
||||
git_oid_mkstr(&bid, blob_oid);
|
||||
@ -148,6 +148,7 @@ BEGIN_TEST(write2, "write a tree from a memory")
|
||||
must_pass(git_treebuilder_write(&rid,repo,builder));
|
||||
|
||||
must_be_true(git_oid_cmp(&rid, &id2) == 0);
|
||||
close_temp_repo(repo);
|
||||
END_TEST
|
||||
|
||||
BEGIN_SUITE(tree)
|
||||
|
Loading…
Reference in New Issue
Block a user