]> gitweb.ps.run Git - ps-cgit/blobdiff - shared.c
ui-shared: currenturl should take into account leading slash
[ps-cgit] / shared.c
index 6e91857066a03faf40ea1153bc8868ee9b29f404..a99173b6113c058cef503e76042a575d1bdbf127 100644 (file)
--- a/shared.c
+++ b/shared.c
@@ -75,6 +75,7 @@ struct cgit_repo *cgit_add_repo(const char *url)
        ret->owner_filter = ctx.cfg.owner_filter;
        ret->clone_url = ctx.cfg.clone_url;
        ret->submodules.strdup_strings = 1;
+       ret->hide = ret->ignore = 0;
        return ret;
 }
 
@@ -85,6 +86,8 @@ struct cgit_repo *cgit_get_repoinfo(const char *url)
 
        for (i = 0; i < cgit_repolist.count; i++) {
                repo = &cgit_repolist.repos[i];
+               if (repo->ignore)
+                       continue;
                if (!strcmp(repo->url, url))
                        return repo;
        }
@@ -281,8 +284,8 @@ static int load_mmfile(mmfile_t *file, const unsigned char *sha1)
  * ripped from git and modified to use globals instead of
  * a special callback-struct.
  */
-char *diffbuf = NULL;
-int buflen = 0;
+static char *diffbuf = NULL;
+static int buflen = 0;
 
 static int filediff_cb(void *priv, mmbuffer_t *mb, int nbuf)
 {