]> gitweb.ps.run Git - ps-cgit/blobdiff - scan-tree.c
css: use less blurry icon for external link
[ps-cgit] / scan-tree.c
index e900ad9ff009a897f056bb0ceb183bcd37ed6f17..2e87999b11b8f10fdbeab0c9b2b20e22b7b46184 100644 (file)
@@ -45,8 +45,8 @@ out:
        return result;
 }
 
        return result;
 }
 
-struct cgit_repo *repo;
-repo_config_fn config_fn;
+static struct cgit_repo *repo;
+static repo_config_fn config_fn;
 
 static void repo_config(const char *name, const char *value)
 {
 
 static void repo_config(const char *name, const char *value)
 {
@@ -61,6 +61,8 @@ static int gitconfig_config(const char *key, const char *value, void *cb)
                config_fn(repo, "desc", value);
        else if (!strcmp(key, "gitweb.category"))
                config_fn(repo, "section", value);
                config_fn(repo, "desc", value);
        else if (!strcmp(key, "gitweb.category"))
                config_fn(repo, "section", value);
+       else if (!strcmp(key, "gitweb.homepage"))
+               config_fn(repo, "homepage", value);
        else if (starts_with(key, "cgit."))
                config_fn(repo, key + 5, value);
 
        else if (starts_with(key, "cgit."))
                config_fn(repo, key + 5, value);
 
@@ -174,7 +176,7 @@ static void add_repo(const char *base, struct strbuf *path, repo_config_fn fn)
 
        strbuf_addstr(path, "cgitrc");
        if (!stat(path->buf, &st))
 
        strbuf_addstr(path, "cgitrc");
        if (!stat(path->buf, &st))
-               parse_configfile(xstrdup(path->buf), &repo_config);
+               parse_configfile(path->buf, &repo_config);
 
        strbuf_release(&rel);
 }
 
        strbuf_release(&rel);
 }