From 1cb8bedf1e0a4aa73bb8ad3f96bfa7eda50919b3 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Sat, 21 Jul 2007 15:24:07 +0200 Subject: 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 --- cgit.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cgit.h') diff --git a/cgit.h b/cgit.h index aabf725..1dbf901 100644 --- a/cgit.h +++ b/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, -- cgit v1.2.3-24-g4f1b