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>
This commit is contained in:
Shawn O. Pearce 2010-09-06 11:36:08 -07:00
parent 741659fed4
commit 6f385076e1
1 changed files with 2 additions and 0 deletions

View File

@ -810,6 +810,8 @@ private void checkConnectivity() throws IOException {
ip = null;
final ObjectWalk ow = new ObjectWalk(db);
ow.setRetainBody(false);
for (final ReceiveCommand cmd : commands) {
if (cmd.getResult() != Result.NOT_ATTEMPTED)
continue;