]> gitweb.ps.run Git - ps-cgit/blobdiff - scan-tree.c
ui-blog: fix oid handling
[ps-cgit] / scan-tree.c
index b5a10ffa5cf491c6ec811413740db20ad0dfb583..08f3f1da4b40d4b294f4c453e1b77bdd7d1828df 100644 (file)
@@ -55,14 +55,18 @@ static void repo_config(const char *name, const char *value)
 
 static int gitconfig_config(const char *key, const char *value, void *cb)
 {
+       const char *name;
+
        if (!strcmp(key, "gitweb.owner"))
                config_fn(repo, "owner", value);
        else if (!strcmp(key, "gitweb.description"))
                config_fn(repo, "desc", value);
        else if (!strcmp(key, "gitweb.category"))
                config_fn(repo, "section", value);
-       else if (starts_with(key, "cgit."))
-               config_fn(repo, key + 5, value);
+       else if (!strcmp(key, "gitweb.homepage"))
+               config_fn(repo, "homepage", value);
+       else if (skip_prefix(key, "cgit.", &name))
+               config_fn(repo, name, value);
 
        return 0;
 }
@@ -244,7 +248,7 @@ void scan_projects(const char *path, const char *projectsfile, repo_config_fn fn
                        projectsfile, strerror(errno), errno);
                return;
        }
-       while (strbuf_getline(&line, projects, '\n') != EOF) {
+       while (strbuf_getline(&line, projects) != EOF) {
                if (!line.len)
                        continue;
                strbuf_insert(&line, 0, "/", 1);