]> gitweb.ps.run Git - ps-cgit/blobdiff - shared.c
CGIT 0.7.2
[ps-cgit] / shared.c
index e06df91bb8c74a617fa95d67e8b0737b4a1099cb..84aa281ea35812b8053d080eecdc221071af4c5f 100644 (file)
--- a/shared.c
+++ b/shared.c
@@ -116,7 +116,7 @@ struct repoinfo *add_repo(const char *url)
        ret->url = trim_end(url, '/');
        ret->name = ret->url;
        ret->path = NULL;
-       ret->desc = NULL;
+       ret->desc = "[no description]";
        ret->owner = NULL;
        ret->group = cgit_repo_group;
        ret->defbranch = "master";
@@ -157,9 +157,11 @@ void cgit_global_config_cb(const char *name, const char *value)
                cgit_logo_link = xstrdup(value);
        else if (!strcmp(name, "module-link"))
                cgit_module_link = xstrdup(value);
-       else if (!strcmp(name, "virtual-root"))
+       else if (!strcmp(name, "virtual-root")) {
                cgit_virtual_root = trim_end(value, '/');
-       else if (!strcmp(name, "nocache"))
+               if (!cgit_virtual_root && (!strcmp(value, "/")))
+                       cgit_virtual_root = "";
+       } else if (!strcmp(name, "nocache"))
                cgit_nocache = atoi(value);
        else if (!strcmp(name, "snapshots"))
                cgit_snapshots = cgit_parse_snapshots_mask(value);