index.jsView |
---|
51 | 51 | } |
52 | 52 | } |
53 | 53 | |
54 | 54 | |
55 | | -function uploadPack(read, haveObject, getObjects, refSource, wantSink, options) { |
| 55 | +function uploadPack(read, hasObject, getObjects, refSource, wantSink, options) { |
56 | 56 | |
57 | 57 | * include-tag multi_ack_detailed symref=HEAD:refs/heads/master |
58 | 58 | * agent=git/2.7.0 */ |
59 | 59 | var sendRefs = receivePackHeader([ |
105 | 105 | cb(end) |
106 | 106 | else if (have.type != 'have') |
107 | 107 | cb(new Error('Unknown have' + JSON.stringify(have))) |
108 | 108 | else |
109 | | - haveObject(have.hash, function (haveIt) { |
| 109 | + hasObject(have.hash, function (haveIt) { |
110 | 110 | if (!haveIt) |
111 | 111 | return readHave(null, next) |
112 | 112 | commonHash = haveIt |
113 | 113 | acked = true |
227 | 227 | |
228 | 228 | module.exports = function (opts) { |
229 | 229 | var ended |
230 | 230 | var objectSink = opts.objectSink || pull.error('Missing object sink') |
231 | | - var haveObject = opts.haveObject || function (hash, cb) { cb(false) } |
| 231 | + var hasObject = opts.hasObject || function (hash, cb) { cb(false) } |
232 | 232 | var getObjects = opts.getObjects || function (id, cb) { |
233 | 233 | cb(null, 0, pull.empty()) |
234 | 234 | } |
235 | 235 | var refSource = opts.refSource || pull.empty() |
244 | 244 | function handleConnect(cmd, read) { |
245 | 245 | var args = util.split2(cmd) |
246 | 246 | switch (args[0]) { |
247 | 247 | case 'git-upload-pack': |
248 | | - return prepend('\n', uploadPack(read, haveObject, getObjects, refSource, |
| 248 | + return prepend('\n', uploadPack(read, hasObject, getObjects, refSource, |
249 | 249 | wantSink, options)) |
250 | 250 | case 'git-receive-pack': |
251 | 251 | return prepend('\n', receivePack(read, objectSink, refSource, |
252 | 252 | updateSink, options)) |