git ssb

0+

cel / pull-git-remote-helper



Commit 7f29ddd9bfe74de11a253a3174249aa55d48e722

Include ref delta source hash in checksum

Charles Lehner committed on 2/19/2016, 3:26:06 AM
Parent: 572af6154e7805025b1d2f75f326e1b759daae87

Files changed

lib/pack.jschanged
lib/pack.jsView
@@ -102,8 +102,9 @@
102102 var b = buffered(read)
103103 // TODO: optimize to pass through buffers to checksum
104104 var readByte = checksum(b.chunks(1))
105105 var readWord = checksum(b.chunks(4))
106+ var readHash = checksum(b.chunks(20))
106107 var readChecksum = b.chunks(20)
107108 var expectChecksum = true
108109 var opts = {
109110 verbosity: 2
@@ -191,9 +192,9 @@
191192 }
192193
193194 // TODO: test with ref-delta objects in pack
194195 function getObjectFromRefDelta(length, cb) {
195- readChecksum(null, function (end, sourceHash) {
196+ readHash(null, function (end, sourceHash) {
196197 if (end) return cb(end)
197198 sourceHash = sourceHash.toString('hex')
198199 var b = buffered(inflateBytes(readByte))
199200 var readInflatedByte = b.chunks(1)

Built with git-ssb-web