[JGIT PATCH 22/23] Don't cut off existing delta chains if we are reusing deltas

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <spearce@xxxxxxxxxxx>
---
 .../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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux