diff options
author | Antonio Navarro Perez <antnavper@gmail.com> | 2016-12-16 19:30:36 +0100 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-12-16 19:30:36 +0100 |
commit | 950676c36030a8796c0a69a8aae606ff1f448b03 (patch) | |
tree | 8edfd1baa31e83a396d263c2d0fed1a4d09a83dc /plumbing/format/packfile/object_pack.go | |
parent | c49d8e374443180ff68404c904ccad5d87f9073e (diff) | |
download | go-git-950676c36030a8796c0a69a8aae606ff1f448b03.tar.gz |
packfile: delta selection logic (#182)
* packfile: delta selection logic
- Implemented logic to assign deltas to objects
* Requested changes
* Improved tests and fix errors
Diffstat (limited to 'plumbing/format/packfile/object_pack.go')
-rw-r--r-- | plumbing/format/packfile/object_pack.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plumbing/format/packfile/object_pack.go b/plumbing/format/packfile/object_pack.go index dfe9bb2..a3e99c0 100644 --- a/plumbing/format/packfile/object_pack.go +++ b/plumbing/format/packfile/object_pack.go @@ -46,3 +46,9 @@ func (o *ObjectToPack) IsDelta() bool { return false } + +func (o *ObjectToPack) SetDelta(base *ObjectToPack, delta plumbing.EncodedObject) { + o.Object = delta + o.Base = base + o.Depth = base.Depth + 1 +} |