2
0
mirror of https://git.zx2c4.com/cgit synced 2025-08-31 06:15:08 +00:00

Enable url=value querystring parameter

This makes is possible to use repo-urls like '/pub/scm/git/git.git' and
even add path specifications, like '/pub/scm/git/git.git/log/documentation'.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
Lars Hjemli
2007-05-18 03:00:54 +02:00
parent 43d40f2b70
commit 30ccdcaa74
6 changed files with 98 additions and 40 deletions

View File

@@ -68,7 +68,10 @@ char *cgit_pageurl(const char *reponame, const char *pagename,
return fmt("%s/%s/%s/", cgit_virtual_root, reponame,
pagename);
} else {
return fmt("?r=%s&p=%s&%s", reponame, pagename, query);
if (query)
return fmt("?r=%s&p=%s&%s", reponame, pagename, query);
else
return fmt("?r=%s&p=%s", reponame, pagename);
}
}