package
use pull-streams to make gitremote-helpers(1)
npm install pull-git-remote-helperGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Make a git remote helper that integrates with git's internal objects.
#!/usr/bin/env node
var toPull = require('stream-to-pull-stream')
var pull = require('pull-stream')
var gitRemoteHelper = require('.')
var repo = {
refs: pull.empty,
hasObject: function (hash, cb) { cb(null, false) },
getObject: function (hash, cb) { cb(null, null) },
update: function (readUpdates, readObjects) {
pull(
readUpdates,
pull.drain(function (update) {
console.error('Updating ' + update.name + ' to ' + update.new)
})
)
readObjects(null, function next(end, object) {
if (end === true) return
if (end) throw end
pull(
object.read,
pull.collect(function (err, bufs) {
if (err) throw err
var buf = Buffer.concat(bufs, object.length)
console.error('Got object', object, buf)
readObjects(null, next)
})
)
})
}
}
pull(
toPull(process.stdin),
gitRemoteHelper(repo),
toPull(process.stdout)
)
gitRemoteHelper(repo)Create a through-stream for the stdio of a git-remote-helper
repo: an abstract-pull-git-repo-compliant git repo object.Fair License
Estimated unpacked size across 21 packages.
2.6 MB
Includes dependencies.
10 direct · 1 outdated
^1.2.1
1.2.2
^1.1.8
2.0.3
^1.1.11
1.1.11
^1.0.0
1.0.0
^0.0.0
0.0.0
^1.2.0
1.2.1
^1.7.2
1.7.3