diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Hand the about filter the tree url its links need
With nothing below the about page, a readme's relative links have to be
written against the tree, and only cgit knows how this site spells the
url of a tree page and which ref the readme was read from. Both reach
the filter already escaped for a url, built by the same writer as
cgit's own links.
Diffstat (limited to 'source/ui-shared.h')
| -rw-r--r-- | source/ui-shared.h | 8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 8 insertions, 0 deletions
diff --git a/source/ui-shared.h b/source/ui-shared.h index 93cc9d2..dd90196 100644 --- a/source/ui-shared.h +++ b/source/ui-shared.h @@ -32,6 +32,14 @@ extern char *cgit_fileurl(const char *reponame, const char *pagename, const char extern char *cgit_pageurl(const char *reponame, const char *pagename, const char *query); /* + * The url of the current repository's tree page at head, split where a path + * in the tree goes, for a filter to build links of its own from. Both parts + * are escaped for a url but not for HTML, and query stays empty for the + * default branch. + */ +extern void cgit_tree_url(const char *head, struct strbuf *base, struct strbuf *query); + +/* * Call fn once for every URL this repository can be cloned from. */ extern void cgit_add_clone_urls(void (*fn)(const char *)); |
