Unidiff1 files changed, 9 insertions, 0 deletions
|
diff --git a/cmd.c b/cmd.c index 07f4707..4edca6b 100644 --- a/ cmd.c+++ b/ cmd.c |
|
@@ -22,6 +22,14 @@ |
22 | #include "ui-tag.h" |
22 | #include "ui-tag.h" |
23 | #include "ui-tree.h" |
23 | #include "ui-tree.h" |
24 | |
24 | |
| |
25 | static void about_fn(struct cgit_context *ctx) |
| |
26 | { |
| |
27 | if (ctx->repo) |
| |
28 | cgit_print_repo_readme(); |
| |
29 | else |
| |
30 | cgit_print_site_readme(); |
| |
31 | } |
| |
32 | |
25 | static void blob_fn(struct cgit_context *ctx) |
33 | static void blob_fn(struct cgit_context *ctx) |
26 | { |
34 | { |
27 | cgit_print_blob(ctx->qry.sha1, ctx->qry.path); |
35 | cgit_print_blob(ctx->qry.sha1, ctx->qry.path); |
@@ -94,6 +102,7 @@ static void tree_fn(struct cgit_context *ctx) |
94 | struct cgit_cmd *cgit_get_cmd(struct cgit_context *ctx) |
102 | struct cgit_cmd *cgit_get_cmd(struct cgit_context *ctx) |
95 | { |
103 | { |
96 | static struct cgit_cmd cmds[] = { |
104 | static struct cgit_cmd cmds[] = { |
| |
105 | def_cmd(about, 0, 1), |
97 | def_cmd(blob, 1, 0), |
106 | def_cmd(blob, 1, 0), |
98 | def_cmd(commit, 1, 1), |
107 | def_cmd(commit, 1, 1), |
99 | def_cmd(diff, 1, 1), |
108 | def_cmd(diff, 1, 1), |
|