X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/9000bbf865cb3578ba5ed3810dc44253cb46ec7f..e19683bedebc74593cb4c4518e47a334a5478e1e:/cmd.c?ds=sidebyside diff --git a/cmd.c b/cmd.c index 07f4707..4edca6b 100644 --- a/cmd.c +++ b/cmd.c @@ -22,6 +22,14 @@ #include "ui-tag.h" #include "ui-tree.h" +static void about_fn(struct cgit_context *ctx) +{ + if (ctx->repo) + cgit_print_repo_readme(); + else + cgit_print_site_readme(); +} + static void blob_fn(struct cgit_context *ctx) { cgit_print_blob(ctx->qry.sha1, ctx->qry.path); @@ -94,6 +102,7 @@ static void tree_fn(struct cgit_context *ctx) struct cgit_cmd *cgit_get_cmd(struct cgit_context *ctx) { static struct cgit_cmd cmds[] = { + def_cmd(about, 0, 1), def_cmd(blob, 1, 0), def_cmd(commit, 1, 1), def_cmd(diff, 1, 1),