summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorColby Ranger <cranger@google.com>2012-12-27 11:21:20 -0800
committerColby Ranger <cranger@google.com>2012-12-27 11:22:35 -0800
commit154e3c886bafc429fe310d40741be34e5e4c87c9 (patch)
tree7882b0f84e588e550f1f74a0a5b9ae6fbe344719 /org.eclipse.jgit
parent5a3d35e9e2f1df0726c460f3a629c5e56cfed8e8 (diff)
downloadjgit-154e3c886bafc429fe310d40741be34e5e4c87c9.tar.gz
jgit-154e3c886bafc429fe310d40741be34e5e4c87c9.zip
Do not enforce DeltaWindow maxMemory when zero.
The maxMemory for a DeltaWindow can be optionally disabled when it is less than or equal to zero. Respect this configuration when enforcing the limits on object load. Change-Id: Ic0f4ffcabf82105f8e690bd0eb5e6be485a313b3
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/DeltaWindow.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/DeltaWindow.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/DeltaWindow.java
index b440774bc6..2f18788915 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/DeltaWindow.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/DeltaWindow.java
@@ -460,6 +460,9 @@ class DeltaWindow {
}
private void checkLoadable(DeltaWindowEntry ent, long need) {
+ if (maxMemory <= 0)
+ return;
+
int tail = next(resSlot);
while (maxMemory < loaded + need) {
DeltaWindowEntry cur = window[tail];