Commit 0053042f2b06e3e73421d72ddc8a3e899155893c
Render git-repo forks
cel committed on 4/17/2017, 11:12:55 PMParent: 6c063d17f531ae299745c431dcccb306081f9f94
Files changed
lib/render-msg.js | changed |
lib/render-msg.js | ||
---|---|---|
@@ -402,14 +402,21 @@ | ||
402 | 402 … | h('a', {href: this.toUrl(chan)}, chan)], cb) |
403 | 403 … | } |
404 | 404 … | |
405 | 405 … | 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 … | + }) | |
412 | 419 … | } |
413 | 420 … | |
414 | 421 … | RenderMsg.prototype.gitUpdate = function (cb) { |
415 | 422 … | var self = this |
Built with git-ssb-web