git ssb

0+

cel / pull-git-remote-helper



Tree: 20c102b7036f7fee19f151e269d33cd7da837a3b

Files: 20c102b7036f7fee19f151e269d33cd7da837a3b / test / git-remote-full.js

710 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 process.send({want: want})
26 }),
27 }),
28 toPull(process.stdout, function (err) {
29 if (err)
30 throw err
31 process.disconnect()
32 })
33)
34

Built with git-ssb-web