diff options
author | Joachim B Haga <cjhaga@fys.uio.no> | 2006-07-03 22:11:47 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-07-03 13:55:11 -0700 |
commit | 12f6c308d53509dcb11e309604457d21d60438db (patch) | |
tree | c4aa1d1649c4ae179f31cd770da328a82ed37a5c /environment.c | |
parent | 8fced61cbc32f0c4b81a3dcecfeb40b7d96339ce (diff) | |
download | git-12f6c308d53509dcb11e309604457d21d60438db.tar.gz git-12f6c308d53509dcb11e309604457d21d60438db.tar.xz |
Make zlib compression level configurable, and change default.
With the change in default, "git add ." on kernel dir is about
twice as fast as before, with only minimal (0.5%) change in
object size. The speed difference is even more noticeable
when committing large files, which is now up to 8 times faster.
The configurability is through setting core.compression = [-1..9]
which maps to the zlib constants; -1 is the default, 0 is no
compression, and 1..9 are various speed/size tradeoffs, 9
being slowest.
Signed-off-by: Joachim B Haga (cjhaga@fys.uio.no)
Acked-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'environment.c')
-rw-r--r-- | environment.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/environment.c b/environment.c index 3de8eb3b2..43823ff7d 100644 --- a/environment.c +++ b/environment.c @@ -20,6 +20,7 @@ int repository_format_version = 0; char git_commit_encoding[MAX_ENCODING_LENGTH] = "utf-8"; int shared_repository = PERM_UMASK; const char *apply_default_whitespace = NULL; +int zlib_compression_level = Z_DEFAULT_COMPRESSION; static char *git_dir, *git_object_dir, *git_index_file, *git_refs_dir, *git_graft_file; |