git ssb

0+

cel / pull-git-remote-helper



Commit 666eaeb2e3d956c1c7e70c3e279e5b993a71a829

Remove refspec and refs prefix

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

Files changed

index.jschanged
test/remote/git-remote-empty.jschanged
test/remote/git-remote-full.jschanged
index.jsView
@@ -17,14 +17,12 @@
1717 return false
1818 }
1919 }
2020
21-function capabilitiesSource(prefix) {
21+function capabilitiesSource() {
2222 return pull.once([
2323 'option',
2424 'connect',
25- 'refspec refs/heads/*:refs/' + prefix + '/heads/*',
26- 'refspec refs/tags/*:refs/' + prefix + '/tags/*',
2725 ].join('\n') + '\n\n')
2826 }
2927
3028 function split2(str, delim) {
@@ -382,9 +380,8 @@
382380 }
383381
384382 module.exports = function (opts) {
385383 var ended
386- var prefix = opts.prefix
387384 var objectSink = opts.objectSink
388385 var getObjects = opts.getObjects || function (id, cb) {
389386 cb(null, 0, pull.empty())
390387 }
@@ -414,9 +411,9 @@
414411 function handleCommand(line, read) {
415412 var args = split2(line)
416413 switch (args[0]) {
417414 case 'capabilities':
418- return capabilitiesSource(prefix)
415+ return capabilitiesSource()
419416 case 'list':
420417 return listRefs(refSource)
421418 case 'connect':
422419 return handleConnect(args[1], read)
test/remote/git-remote-empty.jsView
@@ -13,9 +13,8 @@
1313
1414 pull(
1515 toPull(process.stdin),
1616 require('../../')({
17- prefix: 'foo',
1817 objectSink: function (readObject) {
1918 readObject(null, function next(end, type, length, read) {
2019 if (end === true) return
2120 if (end) throw end
test/remote/git-remote-full.jsView
@@ -36,9 +36,8 @@
3636
3737 pull(
3838 toPull(process.stdin),
3939 require('../../')({
40- prefix: 'foo',
4140 refSource: pull.values(refs),
4241 wantSink: pull.drain(function (want) {
4342 process.send({want: want})
4443 }),

Built with git-ssb-web