Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions pkg/tar-diff/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,13 @@ func (g *deltaGenerator) generateForFile(info *targetInfo) error {

maxBsdiffSize := g.options.maxBsdiffSize

// For files that are smaller than the path to the delta source plus some small
// space for the delta header, skip doing deltas, as delta data will be larger
// than the content.
if file.size <= int64(len(sourceFile.paths[0])+4) {
return nil
}

switch {
case sourceFile.sha1 == file.sha1 && sourceFile.size == file.size:
// Reuse exact file from old tar
Expand Down
Loading