git ssb

16+

cel / patchfoo



Commit 0053042f2b06e3e73421d72ddc8a3e899155893c

Render git-repo forks

cel committed on 4/17/2017, 11:12:55 PM
Parent: 6c063d17f531ae299745c431dcccb306081f9f94

Files changed

lib/render-msg.jschanged
lib/render-msg.jsView
@@ -402,14 +402,21 @@
402402 h('a', {href: this.toUrl(chan)}, chan)], cb)
403403 }
404404
405405 RenderMsg.prototype.gitRepo = function (cb) {
406- this.wrapMini([
407- 'git clone ',
408- h('code', h('small', 'ssb://' + this.msg.key)),
409- this.c.name ? [' ', h('a', {href: this.toUrl(this.msg.key)},
410- this.c.name)] : ''
411- ], cb)
406 + var self = this
407 + var id = self.msg.key
408 + var name = self.c.name
409 + var upstream = self.c.upstream
410 + self.link(upstream, function (err, upstreamA) {
411 + if (err) upstreamA = ('a', {href: self.toUrl(upstream)}, String(name))
412 + self.wrapMini([
413 + upstream ? ['forked ', upstreamA, ': '] : '',
414 + 'git clone ',
415 + h('code', h('small', 'ssb://' + id)),
416 + name ? [' ', h('a', {href: self.toUrl(id)}, String(name))] : ''
417 + ], cb)
418 + })
412419 }
413420
414421 RenderMsg.prototype.gitUpdate = function (cb) {
415422 var self = this

Built with git-ssb-web