mirror of
https://git.zx2c4.com/cgit
synced 2025-08-31 23:10:04 +02:00
introduce cgit_repobasename
that shortens reponame stripping any directories and .git suffixes, that is turning 'dir/repo.git/' or 'dir/repo/.git/' or alikes into mere 'repo'. Signed-off-by: Michael Krelin <hacker@klever.net>
This commit is contained in:
parent
0df096f6e1
commit
1cb8bedf1e
2 changed files with 26 additions and 0 deletions
2
cgit.h
2
cgit.h
|
@ -206,6 +206,8 @@ extern char *cgit_fileurl(const char *reponame, const char *pagename,
|
|||
extern char *cgit_pageurl(const char *reponame, const char *pagename,
|
||||
const char *query);
|
||||
|
||||
extern const char *cgit_repobasename(const char *reponame);
|
||||
|
||||
extern void cgit_tree_link(char *name, char *title, char *class, char *head,
|
||||
char *rev, char *path);
|
||||
extern void cgit_log_link(char *name, char *title, char *class, char *head,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue