aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format
diff options
context:
space:
mode:
authorFilip Navara <filip.navara@gmail.com>2019-04-21 20:43:20 +0200
committerFilip Navara <navara@emclient.com>2019-04-21 20:45:25 +0200
commit72b97da989cd917ed835bd3dc6a0927c8da83480 (patch)
treed84e18fc0c9607130d9e2f3e4f7725285cc38394 /plumbing/format
parent980018a56b9f8c3e499a1199a9923172859c4de1 (diff)
downloadgo-git-72b97da989cd917ed835bd3dc6a0927c8da83480.tar.gz
Update comment
Signed-off-by: Filip Navara <navara@emclient.com>
Diffstat (limited to 'plumbing/format')
-rw-r--r--plumbing/format/packfile/packfile.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/plumbing/format/packfile/packfile.go b/plumbing/format/packfile/packfile.go
index 4fa654c..0aad3e7 100644
--- a/plumbing/format/packfile/packfile.go
+++ b/plumbing/format/packfile/packfile.go
@@ -208,9 +208,9 @@ func (p *Packfile) objectAtOffset(offset int64, hash plumbing.Hash) (plumbing.En
return p.getNextObject(h)
}
- // For delta objects we read the delta data and create a special object
- // that will hold them in memory and resolve them lazily to the referenced
- // object.
+ // For delta objects we read the delta data and apply the small object
+ // optimization only if the expanded version of the object still meets
+ // the small object threshold condition.
buf := bufPool.Get().(*bytes.Buffer)
buf.Reset()
if _, _, err := p.s.NextObject(buf); err != nil {