aboutsummaryrefslogtreecommitdiffstats
path: root/shared.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared.c')
-rw-r--r--shared.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/shared.c b/shared.c
index 699c362..0a0e22e 100644
--- a/shared.c
+++ b/shared.c
@@ -8,7 +8,6 @@
8 8
9#include "cgit.h" 9#include "cgit.h"
10#include <stdio.h> 10#include <stdio.h>
11#include <linux/limits.h>
12 11
13struct cgit_repolist cgit_repolist; 12struct cgit_repolist cgit_repolist;
14struct cgit_context ctx; 13struct cgit_context ctx;
@@ -56,7 +55,6 @@ struct cgit_repo *cgit_add_repo(const char *url)
56 ret->desc = "[no description]"; 55 ret->desc = "[no description]";
57 ret->owner = NULL; 56 ret->owner = NULL;
58 ret->section = ctx.cfg.section; 57 ret->section = ctx.cfg.section;
59 ret->defbranch = "master";
60 ret->snapshots = ctx.cfg.snapshots; 58 ret->snapshots = ctx.cfg.snapshots;
61 ret->enable_commit_graph = ctx.cfg.enable_commit_graph; 59 ret->enable_commit_graph = ctx.cfg.enable_commit_graph;
62 ret->enable_log_filecount = ctx.cfg.enable_log_filecount; 60 ret->enable_log_filecount = ctx.cfg.enable_log_filecount;
@@ -71,6 +69,7 @@ struct cgit_repo *cgit_add_repo(const char *url)
71 ret->commit_filter = ctx.cfg.commit_filter; 69 ret->commit_filter = ctx.cfg.commit_filter;
72 ret->source_filter = ctx.cfg.source_filter; 70 ret->source_filter = ctx.cfg.source_filter;
73 ret->clone_url = ctx.cfg.clone_url; 71 ret->clone_url = ctx.cfg.clone_url;
72 ret->submodules.strdup_strings = 1;
74 return ret; 73 return ret;
75} 74}
76 75
@@ -393,7 +392,7 @@ void cgit_prepare_repo_env(struct cgit_repo * repo)
393 p = env_vars; 392 p = env_vars;
394 q = p + env_var_count; 393 q = p + env_var_count;
395 for (; p < q; p++) 394 for (; p < q; p++)
396 if (setenv(p->name, p->value, 1)) 395 if (p->value && setenv(p->name, p->value, 1))
397 fprintf(stderr, warn, p->name, p->value); 396 fprintf(stderr, warn, p->name, p->value);
398} 397}
399 398