Always attempt delta compression when reuseDeltas is false
If reuseObjects=true but reuseDeltas=false the caller wants attempt a delta for every object in the input list. Test for reuseDeltas to ensure every object passes through the searchInWindow() method. If no delta is possible for an object and it will be stored whole (non-delta format), PackWriter may still reuse its content from any source pack. This avoids an inflate()-deflate() cycle to recompress the object contents. Change-Id: I845caeded419ef4551ef1c85787dd5ffd73235d9
This commit is contained in:
parent
a5c6aac76c
commit
c9707e6353
|
@ -1996,7 +1996,7 @@ public void select(ObjectToPack otp, StoredObjectRepresentation next) {
|
|||
otp.clearReuseAsIs();
|
||||
}
|
||||
|
||||
otp.setDeltaAttempted(next.wasDeltaAttempted());
|
||||
otp.setDeltaAttempted(reuseDeltas & next.wasDeltaAttempted());
|
||||
otp.select(next);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue