Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
a6359408
Commit
a6359408
authored
Apr 10, 2011
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Z_BEST_SPEED for filebuf deflating
This is what Git uses by default for all deflating.
parent
fff036ec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
src/filebuf.c
+1
-1
tests/t09-tree.c
+2
-1
No files found.
src/filebuf.c
View file @
a6359408
...
...
@@ -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
;
}
...
...
tests/t09-tree.c
View file @
a6359408
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment