about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohan Herland <johan@herland.net>2010-06-10 01:09:36 +0200
committerLars Hjemli <hjemli@gmail.com>2010-06-19 10:40:24 +0200
commit7fdff2460440c09d13fc76af3b75e85434e6f563 (patch)
tree2285bf24286d5ec6046a13b18599e0e00e63111d
parentui-commit: Preserve path limit in links to commit page (diff)
downloadcgit-pink-7fdff2460440c09d13fc76af3b75e85434e6f563.tar.gz
cgit-pink-7fdff2460440c09d13fc76af3b75e85434e6f563.zip
ui-shared: Preserve path limit in "tab bar" links
When using the "tab bar" in the pageheader to navigate between pages, any
path limit in effect on the current page is forgotten in the link to the
target page, even if the target page can interpret and use the path limit
constructively.

Instead, preserve the current page's path limit in the "tab bar" links to
other pages, where the path limit is useful to the target page.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r--ui-shared.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 372b9e7..e991799 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -790,16 +790,17 @@ void cgit_print_pageheader(struct cgit_context *ctx)
 		cgit_refs_link("refs", NULL, hc(ctx, "refs"), ctx->qry.head,
 			       ctx->qry.sha1, NULL);
 		cgit_log_link("log", NULL, hc(ctx, "log"), ctx->qry.head,
-			      NULL, NULL, 0, NULL, NULL, ctx->qry.showmsg);
+			      NULL, ctx->qry.vpath, 0, NULL, NULL,
+			      ctx->qry.showmsg);
 		cgit_tree_link("tree", NULL, hc(ctx, "tree"), ctx->qry.head,
-			       ctx->qry.sha1, NULL);
+			       ctx->qry.sha1, ctx->qry.vpath);
 		cgit_commit_link("commit", NULL, hc(ctx, "commit"),
-				 ctx->qry.head, ctx->qry.sha1, NULL, 0);
+				 ctx->qry.head, ctx->qry.sha1, ctx->qry.vpath, 0);
 		cgit_diff_link("diff", NULL, hc(ctx, "diff"), ctx->qry.head,
-			       ctx->qry.sha1, ctx->qry.sha2, NULL, 0);
+			       ctx->qry.sha1, ctx->qry.sha2, ctx->qry.vpath, 0);
 		if (ctx->repo->max_stats)
 			cgit_stats_link("stats", NULL, hc(ctx, "stats"),
-					ctx->qry.head, NULL);
+					ctx->qry.head, ctx->qry.vpath);
 		if (ctx->repo->readme)
 			reporevlink("about", "about", NULL,
 				    hc(ctx, "about"), ctx->qry.head, NULL,
18:06:43 -0400'>2021-04-18tls: Use EC_KEY_set_ex_dataJune McEnroe 2021-04-18Import LibreSSL 3.3.2June McEnroe 2021-03-05Bump version to 3.3.1p1 3.3.1p1June McEnroe 2021-03-05build: Add OpenSSL includes to libcompatJune McEnroe 2020-12-15Import LibreSSL 3.3.1June McEnroe 2020-11-24Import LibreSSL 3.3.0June McEnroe 2020-10-22Import LibreSSL 3.2.2June McEnroe 2020-09-29Import LibreSSL 3.2.1June McEnroe 2020-09-29import: Add m4/ax_add_fortify_source.m4June McEnroe 2020-08-05build: Add README.7 to EXTRA_DIST 3.2.0June McEnroe 2020-08-03doc: Indicate that only OpenSSL 1.1.1b and newer workJune McEnroe