]> gitweb.ps.run Git - ps-cgit/blobdiff - cmd.c
Implement plain view
[ps-cgit] / cmd.c
diff --git a/cmd.c b/cmd.c
index 03e165c169c7c4c6bc99350552b66ca7e795c0e6..2b3418998087d30c5fb3335dc08f8cdef22a12ff 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -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),