diff options
author | Lars Hjemli <hjemli@gmail.com> | 2008-08-06 12:53:50 +0400 |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2008-08-06 13:21:30 +0400 |
commit | e5da4bca54574522b28f88cab0dc8ebad9e35a73 (patch) | |
tree | 08e02b9e0962a12040faab27e7841a74a800ddf2 /cmd.c | |
parent | 02a545e63454530c1639014d3239c14ced2022c6 (diff) |
Implement plain view
This implements a way to access plain blobs by path (similar to the
tree view) instead of by sha1.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'cmd.c')
-rw-r--r-- | cmd.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -16,6 +16,7 @@ #include "ui-diff.h" #include "ui-log.h" #include "ui-patch.h" +#include "ui-plain.h" #include "ui-refs.h" #include "ui-repolist.h" #include "ui-snapshot.h" @@ -85,6 +86,11 @@ static void patch_fn(struct cgit_context *ctx) cgit_print_patch(ctx->qry.sha1); } +static void plain_fn(struct cgit_context *ctx) +{ + cgit_print_plain(ctx); +} + static void refs_fn(struct cgit_context *ctx) { cgit_print_refs(); @@ -128,6 +134,7 @@ struct cgit_cmd *cgit_get_cmd(struct cgit_context *ctx) def_cmd(ls_cache, 0, 0), def_cmd(objects, 1, 0), def_cmd(patch, 1, 0), + def_cmd(plain, 1, 0), def_cmd(refs, 1, 1), def_cmd(repolist, 0, 0), def_cmd(snapshot, 1, 0), |