Unidiff1 files changed, 3 insertions, 0 deletions
|
diff --git a/cgit.c b/cgit.c index 3c11ff0..b282a67 100644 --- a/ cgit.c+++ b/ cgit.c |
|
@@ -60,16 +60,19 @@ static int cgit_prepare_cache(struct cacheitem *item) |
60 | return 1; |
60 | return 1; |
61 | } |
61 | } |
62 | |
62 | |
63 | static void cgit_print_repo_page(struct cacheitem *item) |
63 | static void cgit_print_repo_page(struct cacheitem *item) |
64 | { |
64 | { |
65 | char *title; |
65 | char *title; |
66 | int show_search; |
66 | int show_search; |
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)) { |
69 | title = fmt("%s - %s", cgit_root_title, "Bad request"); |
72 | title = fmt("%s - %s", cgit_root_title, "Bad request"); |
70 | cgit_print_docstart(title, item); |
73 | cgit_print_docstart(title, item); |
71 | cgit_print_pageheader(title, 0); |
74 | cgit_print_pageheader(title, 0); |
72 | cgit_print_error(fmt("Unable to scan repository: %s", |
75 | cgit_print_error(fmt("Unable to scan repository: %s", |
73 | strerror(errno))); |
76 | strerror(errno))); |
74 | cgit_print_docend(); |
77 | cgit_print_docend(); |
75 | return; |
78 | return; |
|