-rw-r--r-- | cgit.c | 14 | ||||
-rw-r--r-- | cgit.h | 1 | ||||
-rw-r--r-- | shared.c | 13 |
3 files changed, 14 insertions, 14 deletions
@@ -13,16 +13,2 @@ const char cgit_version[] = CGIT_VERSION; -static struct repoinfo *cgit_get_repoinfo(char *url) -{ - int i; - struct repoinfo *repo; - - for (i=0; i<cgit_repolist.count; i++) { - repo = &cgit_repolist.repos[i]; - if (!strcmp(repo->url, url)) - return repo; - } - return NULL; -} - - static int cgit_prepare_cache(struct cacheitem *item) @@ -114,2 +114,3 @@ extern int htmlfd; +extern struct repoinfo *cgit_get_repoinfo(const char *url); extern void cgit_global_config_cb(const char *name, const char *value); @@ -95,2 +95,15 @@ struct repoinfo *add_repo(const char *url) +struct repoinfo *cgit_get_repoinfo(const char *url) +{ + int i; + struct repoinfo *repo; + + for (i=0; i<cgit_repolist.count; i++) { + repo = &cgit_repolist.repos[i]; + if (!strcmp(repo->url, url)) + return repo; + } + return NULL; +} + void cgit_global_config_cb(const char *name, const char *value) |