[PATCH v2 04/15] Add source page
Andy Green
andy at warmcat.com
Mon Jun 18 21:27:51 CEST 2018
On June 19, 2018 3:08:16 AM GMT+08:00, John Keeping <john at keeping.me.uk> wrote:
>On Mon, Jun 18, 2018 at 10:57:35AM +0800, Andy Green wrote:
>> From: John Keeping <john at keeping.me.uk>
>>
>> We are about to introduce rendering of content for the tree view.
>This
>> source page will allow bypassing the renderer and accessing the
>content
>> of the current tree view.
>>
>> Signed-off-by: John Keeping <john at keeping.me.uk>
>> ---
>
>While testing this series, I noticed a slight deficiency in the source
>view in that nothing in the header is highlighted.
>
>The following fixup seems like the right thing to do. What do you
>think?
OK thanks I'll squash it in.
-Andy
>-- >8 --
>Subject: [PATCH] fixup! Add source page
>
>Signed-off-by: John Keeping <john at keeping.me.uk>
>---
> ui-shared.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
>diff --git a/ui-shared.c b/ui-shared.c
>index f358a68..c769ff8 100644
>--- a/ui-shared.c
>+++ b/ui-shared.c
>@@ -1006,6 +1006,10 @@ void cgit_print_pageheader(void)
> if (ctx.qry.page && !strcmp(ctx.qry.page, "blame"))
> cgit_blame_link("blame", NULL, hc("blame"), ctx.qry.head,
> ctx.qry.sha1, ctx.qry.vpath);
>+ else if (ctx.qry.page && !strcmp(ctx.qry.page, "source"))
>+ cgit_source_link("tree", NULL, hc("source"),
>+ ctx.qry.head, ctx.qry.sha1,
>+ ctx.qry.vpath);
> else
> cgit_tree_link("tree", NULL, hc("tree"), ctx.qry.head,
> ctx.qry.sha1, ctx.qry.vpath);
More information about the CGit
mailing list