From 6f385076e14effe6dcab8764b123178bd3d2c691 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Mon, 6 Sep 2010 11:36:08 -0700 Subject: [PATCH] Discard object bodies when checking connectivity Since we are only checking the links between objects we don't need to hold onto commit messages after their headers have been parsed by the walker. Dropping them saves a bit of memory, which is always good when accepting huge pack files. Change-Id: I378920409b6acf04a35cdf24f81567b1ce030e36 Signed-off-by: Shawn O. Pearce --- .../src/org/eclipse/jgit/transport/ReceivePack.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java index 53a384117..36ee2fedf 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java @@ -810,6 +810,8 @@ public class ReceivePack { ip = null; final ObjectWalk ow = new ObjectWalk(db); + ow.setRetainBody(false); + for (final ReceiveCommand cmd : commands) { if (cmd.getResult() != Result.NOT_ATTEMPTED) continue;