From: Shawn O. Pearce Date: Thu, 25 Dec 2008 02:11:18 GMT Subject: [JGIT PATCH 22/23] Don't cut off existing delta chains if we are reusing deltas Message-ID: <1230171079-17156-23-git-send-email-spearce@spearce.org> In-Reply-To: <1230171079-17156-22-git-send-email-spearce@spearce.org> The existing pack file may have chains longer than our current max depth, such as if it is a historical pack and was generated with a maximum chain depth >100. Cutting off the chains would create a bigger pack file that we need to transmit, and it costs a lot more CPU time to expand the delta object in order to recompress it whole, because we couldn't copy it directly from the pack file. Signed-off-by: Shawn O. Pearce --- .../src/org/spearce/jgit/lib/PackWriter.java | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/PackWriter.java b/org.spearce.jgit/src/org/spearce/jgit/lib/PackWriter.java index 69b4294..4c01b6e 100644 --- a/org.spearce.jgit/src/org/spearce/jgit/lib/PackWriter.java +++ b/org.spearce.jgit/src/org/spearce/jgit/lib/PackWriter.java @@ -681,12 +681,6 @@ private void writeObject(final ObjectToPack otp) throws IOException { writeObject(deltaBase); } } - - otp.updateDeltaDepth(); - if (otp.getDeltaDepth() > maxDeltaDepth) { - otp.clearDeltaBase(); - otp.disposeLoader(); - } } assert !otp.isWritten(); -- 1.6.1.rc4.301.g5497a