git ssb

0+

cel / pull-git-remote-helper



Tree: b1ed4631de0942640e4c7591c2be9dbdf8e98240

Files: b1ed4631de0942640e4c7591c2be9dbdf8e98240 / test / git-remote-full.js

748 bytesRaw
1#!/usr/bin/env node
2
3var toPull = require('stream-to-pull-stream')
4var pull = require('pull-stream')
5
6process.on('uncaughtException', function (err) {
7 if (err.stack)
8 err = {stack: err.stack, message: err.message}
9 process.send({error: err})
10 process.exit(1)
11})
12
13var HEAD = 'edb5b50e8019797925820007d318870f8c346726'
14var refs = [
15 {name: 'refs/heads/master', value: HEAD},
16 {name: 'HEAD', value: HEAD}
17]
18
19pull(
20 toPull(process.stdin),
21 require('../')({
22 prefix: 'foo',
23 refSource: pull.values(refs),
24 wantSink: pull.drain(function (want) {
25 console.error('got want', want)
26 process.send({want: want})
27 }),
28 }),
29 toPull(process.stdout, function (err) {
30 if (err)
31 throw err
32 process.disconnect()
33 })
34)
35

Built with git-ssb-web