Commit 7f29ddd9bfe74de11a253a3174249aa55d48e722
Include ref delta source hash in checksum
Charles Lehner committed on 2/19/2016, 3:26:06 AMParent: 572af6154e7805025b1d2f75f326e1b759daae87
Files changed
lib/pack.js | changed |
lib/pack.js | ||
---|---|---|
@@ -102,8 +102,9 @@ | ||
102 | 102 | var b = buffered(read) |
103 | 103 | // TODO: optimize to pass through buffers to checksum |
104 | 104 | var readByte = checksum(b.chunks(1)) |
105 | 105 | var readWord = checksum(b.chunks(4)) |
106 | + var readHash = checksum(b.chunks(20)) | |
106 | 107 | var readChecksum = b.chunks(20) |
107 | 108 | var expectChecksum = true |
108 | 109 | var opts = { |
109 | 110 | verbosity: 2 |
@@ -191,9 +192,9 @@ | ||
191 | 192 | } |
192 | 193 | |
193 | 194 | // TODO: test with ref-delta objects in pack |
194 | 195 | function getObjectFromRefDelta(length, cb) { |
195 | - readChecksum(null, function (end, sourceHash) { | |
196 | + readHash(null, function (end, sourceHash) { | |
196 | 197 | if (end) return cb(end) |
197 | 198 | sourceHash = sourceHash.toString('hex') |
198 | 199 | var b = buffered(inflateBytes(readByte)) |
199 | 200 | var readInflatedByte = b.chunks(1) |
Built with git-ssb-web