diff options
author | Eric Wong <e@80x24.org> | 2022-08-22 02:33:46 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-08-23 04:19:02 +0000 |
commit | 22dd13c407be75d2a5cad178593e78db8735d3bc (patch) | |
tree | 8d00fea9a2f4bd5938ddbf24f88ff3bc7a6cd62c /lib/PublicInbox/WwwStream.pm | |
parent | d52b0a01bebc0f56523a6f66c25ac38d500da4d9 (diff) | |
download | public-inbox-22dd13c407be75d2a5cad178593e78db8735d3bc.tar.gz |
For non-merge git commits, we already have ViewDiff for displaying patch emails, we can reuse it to display non-merge git commits. AFAIK, this is the first web-based git repository viewer to display the output of "git-patch-id --stable". It currently fills in the search form box with "patchid:", but maybe it'll do more than that. More work will be done to support bidirectional mapping of commits to emails in the future.
Diffstat (limited to 'lib/PublicInbox/WwwStream.pm')
-rw-r--r-- | lib/PublicInbox/WwwStream.pm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm index 0416db0b..ab006c40 100644 --- a/lib/PublicInbox/WwwStream.pm +++ b/lib/PublicInbox/WwwStream.pm @@ -201,4 +201,13 @@ sub aresponse { $ctx->psgi_response($code, $res_hdr); } +sub html_init { + my ($ctx) = @_; + $ctx->{base_url} = base_url($ctx); + my $h = $ctx->{-res_hdr} = ['Content-Type', 'text/html; charset=UTF-8']; + $ctx->{gz} = PublicInbox::GzipFilter::gz_or_noop($h, $ctx->{env}); + bless $ctx, __PACKAGE__; + $ctx->zmore(html_top($ctx)); +} + 1; |