Files: 20c102b7036f7fee19f151e269d33cd7da837a3b / test / git-remote-full.js
710 bytesRaw
1 | |
2 | |
3 | var toPull = require('stream-to-pull-stream') |
4 | var pull = require('pull-stream') |
5 | |
6 | process.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 | |
13 | var HEAD = 'edb5b50e8019797925820007d318870f8c346726' |
14 | var refs = [ |
15 | {name: 'refs/heads/master', value: HEAD}, |
16 | {name: 'HEAD', value: HEAD} |
17 | ] |
18 | |
19 | pull( |
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