summaryrefslogtreecommitdiffabout
path: root/cgit.h
authorJohan Herland <johan@herland.net>2010-06-09 23:09:26 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2010-06-19 08:40:22 (UTC)
commit0ff143df7043b7dd87c31c50fa875bc96d1a7779 (patch) (side-by-side diff)
treed1625ba2aafed1ddfebc429921abdbb0d692042f /cgit.h
parent0e34c6d1ef32ea8f69019272fe72dbf2aeaba392 (diff)
downloadcgit-0ff143df7043b7dd87c31c50fa875bc96d1a7779.zip
cgit-0ff143df7043b7dd87c31c50fa875bc96d1a7779.tar.gz
cgit-0ff143df7043b7dd87c31c50fa875bc96d1a7779.tar.bz2
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 'cgit.h') (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/cgit.h b/cgit.h
index cd4af72..f990b15 100644
--- a/cgit.h
+++ b/cgit.h
@@ -145,6 +145,7 @@ struct cgit_query {
char *sort;
int showmsg;
int ssdiff;
+ char *vpath;
};
struct cgit_config {