diff options
Diffstat (limited to 'shared.c')
-rw-r--r-- | shared.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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 | ||
13 | struct cgit_repolist cgit_repolist; | 12 | struct cgit_repolist cgit_repolist; |
14 | struct cgit_context ctx; | 13 | struct 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 | ||