diff options
author | justanothercatgirl <sotov@twistea.su> | 2025-04-02 21:00:51 +0200 |
---|---|---|
committer | justanothercatgirl <sotov@twistea.su> | 2025-04-02 21:00:51 +0200 |
commit | d946c8cf11385f5766e827ae71b3fc798750a335 (patch) | |
tree | 52105e039563e264cbaf84a0bda6cd1df7945b30 /cmd.c | |
parent | 09d24d7cd0b7e85633f2f43808b12871bb209d69 (diff) |
Note: currently breaks repos that contain no readme
Diffstat (limited to 'cmd.c')
-rw-r--r-- | cmd.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -193,14 +193,13 @@ struct cgit_cmd *cgit_get_cmd(void) def_cmd(tree, 1, 1, 0), }; int i; - if (ctx.qry.page == NULL) { if (ctx.repo) - ctx.qry.page = "summary"; + ctx.qry.page = ctx.cfg.default_index; else ctx.qry.page = "repolist"; } - + for (i = 0; i < sizeof(cmds)/sizeof(*cmds); i++) if (!strcmp(ctx.qry.page, cmds[i].name)) return &cmds[i]; |