git ssb

30+

cel / git-ssb-web



Commit 142c96c12f91925f2d8e247a810ff62f75422edf

Show subproject commits in diffs

Fix %tfQsPRHUWUHeiJA5p20oIF8I091PPf6yeEEdcq42el8=.sha256
Charles Lehner committed on 6/1/2016, 1:47:54 PM
Parent: 0d3f9e454b13bbf362f40fa20967d27c107b587a

Files changed

lib/repos/index.jschanged
lib/repos/index.jsView
@@ -22,10 +22,12 @@
2222 }
2323
2424 var R = RepoRoutes.prototype
2525
26-function getRepoObjectString(repo, id, cb) {
26+function getRepoObjectString(repo, id, mode, cb) {
2727 if (!id) return cb(null, '')
28+ if (mode == 0160000) return cb(null,
29+ 'Subproject commit ' + id)
2830 repo.getObjectFromAny(id, function (err, obj) {
2931 if (err) return cb(err)
3032 u.readObjectString(obj, cb)
3133 })
@@ -624,10 +626,12 @@
624626 ' alt="' + filename + '"/></td></tr>' +
625627 '</table></pre>')
626628 }
627629 var done = multicb({ pluck: 1, spread: true })
628- getRepoObjectString(repos[0], item.id[0], done())
629- getRepoObjectString(repos[1], item.id[lastI], done())
630+ var mode0 = item.mode && item.mode[0]
631+ var modeI = item.mode && item.mode[lastI]
632+ getRepoObjectString(repos[0], item.id[0], mode0, done())
633+ getRepoObjectString(repos[1], item.id[lastI], modeI, done())
630634 done(function (err, strOld, strNew) {
631635 if (err) return cb(err)
632636 cb(null, htmlLineDiff(req, item.filename, item.filename,
633637 strOld, strNew,

Built with git-ssb-web