-rw-r--r-- | cmd.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -23,2 +23,3 @@ #include "ui-snapshot.h" +#include "ui-stats.h" #include "ui-summary.h" @@ -106,4 +107,3 @@ static void snapshot_fn(struct cgit_context *ctx) { - cgit_print_snapshot(ctx->qry.head, ctx->qry.sha1, - cgit_repobasename(ctx->repo->url), ctx->qry.path, + cgit_print_snapshot(ctx->qry.head, ctx->qry.sha1, ctx->qry.path, ctx->repo->snapshots, ctx->qry.nohead); @@ -111,2 +111,7 @@ static void snapshot_fn(struct cgit_context *ctx) +static void stats_fn(struct cgit_context *ctx) +{ + cgit_show_stats(ctx); +} + static void summary_fn(struct cgit_context *ctx) @@ -147,2 +152,3 @@ struct cgit_cmd *cgit_get_cmd(struct cgit_context *ctx) def_cmd(snapshot, 1, 0), + def_cmd(stats, 1, 1), def_cmd(summary, 1, 1), |