aboutsummaryrefslogtreecommitdiff
path: root/lib/serve.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/serve.js')
-rw-r--r--lib/serve.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/serve.js b/lib/serve.js
index 145777d..2eecd09 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -1739,6 +1739,24 @@ Serve.prototype.gitCommit = function (rev) {
self.respondSink(400)
)
+ if (self.query.search) {
+ return self.app.git.getObjectMsg({
+ obj: rev,
+ headMsgId: self.query.msg,
+ }, function (err, msg) {
+ if (err && err.name === 'BlobNotFoundError')
+ return self.askWantBlobs(err.links)
+ if (err) return pull(
+ pull.once(u.renderError(err).outerHTML),
+ self.wrapPage('git commit ' + rev),
+ self.respondSink(400)
+ )
+ var path = '/git/commit/' + rev
+ + '?msg=' + encodeURIComponent(msg.key)
+ return self.redirect(self.app.render.toUrl(path))
+ })
+ }
+
self.app.git.openObject({
obj: rev,
msg: self.query.msg,