diff options
author | Paulo Gomes <pjbgf@linux.com> | 2023-11-06 21:31:10 +0000 |
---|---|---|
committer | Paulo Gomes <pjbgf@linux.com> | 2023-11-06 21:38:24 +0000 |
commit | f7cd844ced42685ed1e6676b0598f064ea5a5bc8 (patch) | |
tree | 1bdb82b57f5bf971f2bc8acac21678b34af73f4c /plumbing/format/packfile/diff_delta.go | |
parent | cf196ea5ba6c8b16712a9868cc2d4cca4f287ae4 (diff) | |
download | go-git-f7cd844ced42685ed1e6676b0598f064ea5a5bc8.tar.gz |
plumbing: format/packfile, Refactor patch delta
The changes aim to simplify the code and reduce duplication.
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
Diffstat (limited to 'plumbing/format/packfile/diff_delta.go')
-rw-r--r-- | plumbing/format/packfile/diff_delta.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plumbing/format/packfile/diff_delta.go b/plumbing/format/packfile/diff_delta.go index 2c7a335..8898e58 100644 --- a/plumbing/format/packfile/diff_delta.go +++ b/plumbing/format/packfile/diff_delta.go @@ -17,8 +17,11 @@ const ( s = 16 // https://github.com/git/git/blob/f7466e94375b3be27f229c78873f0acf8301c0a5/diff-delta.c#L428 - // Max size of a copy operation (64KB) + // Max size of a copy operation (64KB). maxCopySize = 64 * 1024 + + // Min size of a copy operation. + minCopySize = 4 ) // GetDelta returns an EncodedObject of type OFSDeltaObject. Base and Target object, |