diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2010-09-06 11:36:08 -0700 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2010-09-06 11:36:08 -0700 |
commit | 6f385076e14effe6dcab8764b123178bd3d2c691 (patch) | |
tree | 28ab39979e1ac66d70f531923ef2db5ff6d94e26 | |
parent | 741659fed4e73b71693b408e137804b17e65f0cb (diff) | |
download | jgit-6f385076e14effe6dcab8764b123178bd3d2c691.tar.gz jgit-6f385076e14effe6dcab8764b123178bd3d2c691.zip |
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 <spearce@spearce.org>
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java | 2 |
1 files changed, 2 insertions, 0 deletions
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 53a3841173..36ee2fedf6 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; |