aboutsummaryrefslogtreecommitdiffstats
path: root/cgit.c
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2010-06-22 16:15:48 +0200
committerLars Hjemli <hjemli@gmail.com>2010-06-22 16:15:48 +0200
commit37a24e4e39737edaa5cdde501346a65eeb280e63 (patch)
treeff23eb0d57edf108edd1aa3e64a8d6cf70062954 /cgit.c
parentFix style of commit-filter links in commit-subject. (diff)
parentui-shared.c: path-limit style nitpick (diff)
downloadcgit-37a24e4e39737edaa5cdde501346a65eeb280e63.tar.xz
cgit-37a24e4e39737edaa5cdde501346a65eeb280e63.zip
Merge branch 'jh/path-limit'
Conflicts: cgit.h ui-commit.c
Diffstat (limited to 'cgit.c')
-rw-r--r--cgit.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/cgit.c b/cgit.c
index 38bc136..d4fcfa7 100644
--- a/cgit.c
+++ b/cgit.c
@@ -433,6 +433,12 @@ static void process_request(void *cbdata)
return;
}
+ /* If cmd->want_vpath is set, assume ctx->qry.path contains a "virtual"
+ * in-project path limit to be made available at ctx->qry.vpath.
+ * Otherwise, no path limit is in effect (ctx->qry.vpath = NULL).
+ */
+ ctx->qry.vpath = cmd->want_vpath ? ctx->qry.path : NULL;
+
if (cmd->want_repo && !ctx->repo) {
cgit_print_http_headers(ctx);
cgit_print_docstart(ctx);