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>
Tento commit je obsažen v:
Michael Krelin
2007-07-21 15:24:07 +02:00
rodič 0df096f6e1
revize 1cb8bedf1e
2 změnil soubory, kde provedl 26 přidání a 0 odebrání

2
cgit.h
Zobrazit soubor

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