about summary refs log tree commit diff
path: root/cmd.h
diff options
context:
space:
mode:
authorJohan Herland <johan@herland.net>2010-06-10 01:09:26 +0200
committerLars Hjemli <hjemli@gmail.com>2010-06-19 10:40:22 +0200
commit0ff143df7043b7dd87c31c50fa875bc96d1a7779 (patch)
treed1625ba2aafed1ddfebc429921abdbb0d692042f /cmd.h
parentui-shared: Remove needless cgit_get_cmd() call, and refactor hc() accordingly (diff)
downloadcgit-pink-0ff143df7043b7dd87c31c50fa875bc96d1a7779.tar.gz
cgit-pink-0ff143df7043b7dd87c31c50fa875bc96d1a7779.zip
struct cgit_cmd: Differentiate between various usages of ctx.qry.path
For many commands/pages (e.g. 'tree', 'diff', 'plain', etc.), the
ctx.qry.path argument is interpreted as a path within the "virtual" project
directory structure. However, for some other commands (notably 'refs', and
the clone-related commands) ctx.qry.path is used in a different context (as
a more or less "real" path within the '.git' directory).

This patch differentiates between these two usages of ctx.qry.path, by
introducing a new variable - ctx.qry.vpath - which is equal to ctx.qry.path
in the former case, and NULL in the latter.

This will become useful in future patches when we want various pages and the
links between them to preserve existing in-project paths.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'cmd.h')
-rw-r--r--cmd.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd.h b/cmd.h
index ec9e691..8dc01bd 100644
--- a/cmd.h
+++ b/cmd.h
@@ -7,7 +7,8 @@ struct cgit_cmd {
 	const char *name;
 	cgit_cmd_fn fn;
 	unsigned int want_repo:1,
-		want_layout:1;
+		want_layout:1,
+		want_vpath:1;
 };
 
 extern struct cgit_cmd *cgit_get_cmd(struct cgit_context *ctx);
>2015-08-12shared: make cgit_diff_tree_cb publicJohn Keeping This will allow us to use this nice wrapper function elsewhere, avoiding dealing with the diff queue when we only need to inspect a filepair. Signed-off-by: John Keeping <john@keeping.me.uk> 2015-08-12t0110: Chain together using &&Jason A. Donenfeld 2015-08-12about: always ensure page has a trailing slashJason A. Donenfeld Otherwise we can't easily embed links to other /about/ pages. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> 2015-08-12filters: apply HTML escapingLazaros Koromilas http://www.w3.org/International/questions/qa-escapes#use 2015-08-12git: update to v2.5.0Christian Hesse Update to git version v2.5.0. * Upstream commit 5455ee0573a22bb793a7083d593ae1ace909cd4c (Merge branch 'bc/object-id') changed API: for_each_ref() callback functions were taught to name the objects not with "unsigned char sha1[20]" but with "struct object_id". * Upstream commit dcf692625ac569fefbe52269061230f4fde10e47 (path.c: make get_pathname() call sites return const char *) Signed-off-by: Christian Hesse <mail@eworm.de> 2015-08-12Fix processing of repo.hide and repo.ignoreDaniel Reichelt