aboutsummaryrefslogtreecommitdiff
path: root/lib/serve.js
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-12-25 10:20:12 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-12-25 11:21:25 -1000
commit704394335d188f98074906558c73db228c571690 (patch)
treea3e5314b649af6acb92e352e512fa8cce9e9e771 /lib/serve.js
parent6646ec3620bff75ffca314d5c0eb5019ea7c52e1 (diff)
downloadpatchfoo-704394335d188f98074906558c73db228c571690.tar.gz
patchfoo-704394335d188f98074906558c73db228c571690.zip
Handle more missing git blobs
Diffstat (limited to 'lib/serve.js')
-rw-r--r--lib/serve.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/serve.js b/lib/serve.js
index 40f92a8..73e209c 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -1896,12 +1896,16 @@ Serve.prototype.gitTree = function (rev) {
headMsgId: obj.msg.key,
}, function (err, msg) {
if (err && err.name === 'ObjectNotFoundError') return cb(null, file)
+ if (err && err.name === 'BlobNotFoundError') return cb(null, {missingBlobs: err.links})
if (err) return cb(err)
file.msg = msg
cb(null, file)
})
}, 8),
pull.map(function (item) {
+ if (item.missingBlobs) {
+ return self.askWantBlobsForm(item.missingBlobs)
+ }
if (!item.msg) return ph('tr', [
ph('td',
u.escapeHTML(item.name) + (item.type === 'tree' ? '/' : '')),