git ssb

0+

cel / pull-git-remote-helper



Commit b390ecc4bf4d610b201252d8a8a0cd1ad8cd2748

Use pull.through

Charles Lehner committed on 2/17/2016, 3:03:54 AM
Parent: 079bb118621d4c2fe7fcdefdceeb7bbe93930f13

Files changed

index.jschanged
index.jsView
@@ -131,22 +131,8 @@
131131 }
132132 ])
133133 }
134134
135-// run a callback when a pipeline ends
136-// TODO: find a better way to do this
137-function onThroughEnd(onEnd) {
138- return function (read) {
139- return function (end, cb) {
140- read(end, function (end, data) {
141- cb(end, data)
142- if (end)
143- onEnd(end === true ? null : end)
144- })
145- }
146- }
147-}
148-
149135 /*
150136 TODO: investigate capabilities
151137 report-status delete-refs side-band-64k quiet atomic ofs-delta
152138 */
@@ -195,9 +181,9 @@
195181 // receive their refs
196182 var lines = pktLine.decode(read, options)
197183 pull(
198184 lines.updates,
199- onThroughEnd(updatesDone),
185+ pull.through(null, updatesDone),
200186 updateSink
201187 )
202188 function updatesDone(err) {
203189 if (err) return cb(err)

Built with git-ssb-web