]> gitweb.ps.run Git - ps-cgit/blobdiff - cmd.c
Allow for creating patch series
[ps-cgit] / cmd.c
diff --git a/cmd.c b/cmd.c
index abe8e46098c0a284cb412b4328a5e9d33950566f..0202917e6c7366fdd6e95e3cde3c39198e6968f6 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -57,7 +57,12 @@ static void commit_fn(struct cgit_context *ctx)
 
 static void diff_fn(struct cgit_context *ctx)
 {
-       cgit_print_diff(ctx->qry.sha1, ctx->qry.sha2, ctx->qry.path, 1);
+       cgit_print_diff(ctx->qry.sha1, ctx->qry.sha2, ctx->qry.path, 1, 0);
+}
+
+static void rawdiff_fn(struct cgit_context *ctx)
+{
+       cgit_print_diff(ctx->qry.sha1, ctx->qry.sha2, ctx->qry.path, 1, 1);
 }
 
 static void info_fn(struct cgit_context *ctx)
@@ -93,7 +98,7 @@ static void repolist_fn(struct cgit_context *ctx)
 
 static void patch_fn(struct cgit_context *ctx)
 {
-       cgit_print_patch(ctx->qry.sha1, ctx->qry.path);
+       cgit_print_patch(ctx->qry.sha1, ctx->qry.sha2, ctx->qry.path);
 }
 
 static void plain_fn(struct cgit_context *ctx)
@@ -150,6 +155,7 @@ struct cgit_cmd *cgit_get_cmd(struct cgit_context *ctx)
                def_cmd(objects, 1, 0, 0, 1),
                def_cmd(patch, 1, 0, 1, 0),
                def_cmd(plain, 1, 0, 0, 0),
+               def_cmd(rawdiff, 1, 0, 1, 0),
                def_cmd(refs, 1, 1, 0, 0),
                def_cmd(repolist, 0, 0, 0, 0),
                def_cmd(snapshot, 1, 0, 0, 0),