]> gitweb.ps.run Git - ps-cgit/blobdiff - shared.c
ui-snapshot: pass -n to gzip, to suppress timestamp
[ps-cgit] / shared.c
index 75c4b5c7e0c78b11bb7ff344e5ef0fd82fc9535d..0a0e22e7255b0db8b9446c496fa85b58d46e24aa 100644 (file)
--- a/shared.c
+++ b/shared.c
@@ -55,7 +55,6 @@ struct cgit_repo *cgit_add_repo(const char *url)
        ret->desc = "[no description]";
        ret->owner = NULL;
        ret->section = ctx.cfg.section;
-       ret->defbranch = "master";
        ret->snapshots = ctx.cfg.snapshots;
        ret->enable_commit_graph = ctx.cfg.enable_commit_graph;
        ret->enable_log_filecount = ctx.cfg.enable_log_filecount;
@@ -70,6 +69,7 @@ struct cgit_repo *cgit_add_repo(const char *url)
        ret->commit_filter = ctx.cfg.commit_filter;
        ret->source_filter = ctx.cfg.source_filter;
        ret->clone_url = ctx.cfg.clone_url;
+       ret->submodules.strdup_strings = 1;
        return ret;
 }
 
@@ -392,7 +392,7 @@ void cgit_prepare_repo_env(struct cgit_repo * repo)
        p = env_vars;
        q = p + env_var_count;
        for (; p < q; p++)
-               if (setenv(p->name, p->value, 1))
+               if (p->value && setenv(p->name, p->value, 1))
                        fprintf(stderr, warn, p->name, p->value);
 }