[PATCH v2 04/15] Add source page
John Keeping
john at keeping.me.uk
Mon Jun 18 21:08:16 CEST 2018
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?
-- >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);
--
2.17.1
More information about the CGit
mailing list