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:
Michael Krelin
2007-07-21 15:24:07 +02:00
förälder 0df096f6e1
incheckning 1cb8bedf1e
2 ändrade filer med 26 tillägg och 0 borttagningar

2
cgit.h
Visa fil

@ -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,