summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 074b2ee)
raw | patch | inline | side by side (parent: 074b2ee)
author | Martin Koegler <mkoegler@auto.tuwien.ac.at> | |
Mon, 28 May 2007 21:20:59 +0000 (23:20 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 29 May 2007 08:24:42 +0000 (01:24 -0700) |
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Documentation/config.txt | patch | blob | history | |
builtin-pack-objects.c | patch | blob | history |
index ab0f8f48655e27ee7b99a5e4c30e098a84cbcae5..6ea4f10150ee4034e4c24752a444ef324506ea69 100644 (file)
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
gitlink:git-pack-objects[1].
A value of 0 means no limit. Defaults to 0.
+pack.deltaCacheLimit::
+ The maxium size of a delta, that is cached in
+ gitlink:git-pack-objects[1]. Defaults to 1000.
+
pull.octopus::
The default merge strategy to use when pulling multiple branches
at once.
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 9f035ba8e645e45547fe3145674efb33cfc9cb23..41472fcbd09b4ab5c1732d7656ebc70e4fb563dd 100644 (file)
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
static unsigned long delta_cache_size = 0;
static unsigned long max_delta_cache_size = 0;
+static unsigned long cache_max_small_delta_size = 1000;
/*
* The object names in objects array are hashed with this hashtable,
if (max_delta_cache_size && delta_cache_size + delta_size > max_delta_cache_size)
return 0;
+ if (delta_size < cache_max_small_delta_size)
+ return 1;
+
/* cache delta, if objects are large enough compared to delta size */
if ((src_size >> 20) + (trg_size >> 21) > (delta_size >> 10))
return 1;
max_delta_cache_size = git_config_int(k, v);
return 0;
}
+ if (!strcmp(k, "pack.deltacachelimit")) {
+ cache_max_small_delta_size = git_config_int(k, v);
+ return 0;
+ }
return git_default_config(k, v);
}