|
diff --git a/cgit.c b/cgit.c index 3c11ff0..b282a67 100644 --- a/ cgit.c+++ b/ cgit.c |
|
@@ -67,2 +67,5 @@ static void cgit_print_repo_page(struct cacheitem *item) |
67 | |
67 | |
| |
68 | if (!cgit_query_head) |
| |
69 | cgit_query_head = cgit_repo->defbranch; |
| |
70 | |
68 | if (chdir(cgit_repo->path)) { |
71 | if (chdir(cgit_repo->path)) { |
|
|
diff --git a/cgit.h b/cgit.h index f5906ad..ac710a6 100644 --- a/ cgit.h+++ b/ cgit.h |
|
@@ -37,2 +37,3 @@ struct repoinfo { |
37 | char *owner; |
37 | char *owner; |
| |
38 | char *defbranch; |
38 | char *module_link; |
39 | char *module_link; |
|
|
diff --git a/shared.c b/shared.c index 8505397..a1e1acd 100644 --- a/ shared.c+++ b/ shared.c |
|
@@ -34,6 +34,2 @@ int cgit_max_commit_count = 50; |
34 | |
34 | |
35 | char *cgit_repo_name = NULL; |
| |
36 | char *cgit_repo_desc = NULL; |
| |
37 | char *cgit_repo_owner = NULL; |
| |
38 | |
| |
39 | int cgit_query_has_symref = 0; |
35 | int cgit_query_has_symref = 0; |
@@ -88,2 +84,3 @@ struct repoinfo *add_repo(const char *url) |
88 | ret->owner = NULL; |
84 | ret->owner = NULL; |
| |
85 | ret->defbranch = "master"; |
89 | ret->snapshots = cgit_snapshots; |
86 | ret->snapshots = cgit_snapshots; |
@@ -135,2 +132,4 @@ void cgit_global_config_cb(const char *name, const char *value) |
135 | cgit_repo->owner = xstrdup(value); |
132 | cgit_repo->owner = xstrdup(value); |
| |
133 | else if (cgit_repo && !strcmp(name, "repo.defbranch")) |
| |
134 | cgit_repo->defbranch = xstrdup(value); |
136 | else if (cgit_repo && !strcmp(name, "repo.snapshots")) |
135 | else if (cgit_repo && !strcmp(name, "repo.snapshots")) |
@@ -143,12 +142,2 @@ void cgit_global_config_cb(const char *name, const char *value) |
143 | |
142 | |
144 | void cgit_repo_config_cb(const char *name, const char *value) |
| |
145 | { |
| |
146 | if (!strcmp(name, "name")) |
| |
147 | cgit_repo_name = xstrdup(value); |
| |
148 | else if (!strcmp(name, "desc")) |
| |
149 | cgit_repo_desc = xstrdup(value); |
| |
150 | else if (!strcmp(name, "owner")) |
| |
151 | cgit_repo_owner = xstrdup(value); |
| |
152 | } |
| |
153 | |
| |
154 | void cgit_querystring_cb(const char *name, const char *value) |
143 | void cgit_querystring_cb(const char *name, const char *value) |
|