Commit 142c96c12f91925f2d8e247a810ff62f75422edf
Show subproject commits in diffs
Fix %tfQsPRHUWUHeiJA5p20oIF8I091PPf6yeEEdcq42el8=.sha256Charles Lehner committed on 6/1/2016, 1:47:54 PM
Parent: 0d3f9e454b13bbf362f40fa20967d27c107b587a
Files changed
lib/repos/index.js | changed |
lib/repos/index.js | ||
---|---|---|
@@ -22,10 +22,12 @@ | ||
22 | 22 | } |
23 | 23 | |
24 | 24 | var R = RepoRoutes.prototype |
25 | 25 | |
26 | -function getRepoObjectString(repo, id, cb) { | |
26 | +function getRepoObjectString(repo, id, mode, cb) { | |
27 | 27 | if (!id) return cb(null, '') |
28 | + if (mode == 0160000) return cb(null, | |
29 | + 'Subproject commit ' + id) | |
28 | 30 | repo.getObjectFromAny(id, function (err, obj) { |
29 | 31 | if (err) return cb(err) |
30 | 32 | u.readObjectString(obj, cb) |
31 | 33 | }) |
@@ -624,10 +626,12 @@ | ||
624 | 626 | ' alt="' + filename + '"/></td></tr>' + |
625 | 627 | '</table></pre>') |
626 | 628 | } |
627 | 629 | 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()) | |
630 | 634 | done(function (err, strOld, strNew) { |
631 | 635 | if (err) return cb(err) |
632 | 636 | cb(null, htmlLineDiff(req, item.filename, item.filename, |
633 | 637 | strOld, strNew, |
Built with git-ssb-web