git ssb

0+

cel / pull-git-remote-helper



Commit 4115e4acf3d966227fdd0dcb6f31299222267f36

Rename haveObjects to hasObjects

Charles Lehner committed on 2/8/2016, 4:37:24 AM
Parent: 37179aaad737deafec53e3dee30ae7f7b281a62c

Files changed

index.jschanged
test/remote/git-remote-full.jschanged
index.jsView
@@ -51,9 +51,9 @@
5151 }
5252 }
5353
5454 // upload-pack: fetch to client
55-function uploadPack(read, haveObject, getObjects, refSource, wantSink, options) {
55+function uploadPack(read, hasObject, getObjects, refSource, wantSink, options) {
5656 /* multi_ack thin-pack side-band side-band-64k ofs-delta shallow no-progress
5757 * include-tag multi_ack_detailed symref=HEAD:refs/heads/master
5858 * agent=git/2.7.0 */
5959 var sendRefs = receivePackHeader([
@@ -105,9 +105,9 @@
105105 cb(end)
106106 else if (have.type != 'have')
107107 cb(new Error('Unknown have' + JSON.stringify(have)))
108108 else
109- haveObject(have.hash, function (haveIt) {
109+ hasObject(have.hash, function (haveIt) {
110110 if (!haveIt)
111111 return readHave(null, next)
112112 commonHash = haveIt
113113 acked = true
@@ -227,9 +227,9 @@
227227
228228 module.exports = function (opts) {
229229 var ended
230230 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) }
232232 var getObjects = opts.getObjects || function (id, cb) {
233233 cb(null, 0, pull.empty())
234234 }
235235 var refSource = opts.refSource || pull.empty()
@@ -244,9 +244,9 @@
244244 function handleConnect(cmd, read) {
245245 var args = util.split2(cmd)
246246 switch (args[0]) {
247247 case 'git-upload-pack':
248- return prepend('\n', uploadPack(read, haveObject, getObjects, refSource,
248+ return prepend('\n', uploadPack(read, hasObject, getObjects, refSource,
249249 wantSink, options))
250250 case 'git-receive-pack':
251251 return prepend('\n', receivePack(read, objectSink, refSource,
252252 updateSink, options))
test/remote/git-remote-full.jsView
@@ -49,9 +49,9 @@
4949 refSource: pull.values(refs),
5050 wantSink: pull.drain(function (want) {
5151 process.send({want: want})
5252 }),
53- haveObject: function (hash, cb) {
53+ hasObject: function (hash, cb) {
5454 cb(hash in hashes)
5555 },
5656 getObjects: function (ancestorHash, cb) {
5757 cb(null, objects.length, pull(

Built with git-ssb-web