X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/9003cc172a4cbc6678f3d8003ae1ad3a55f62fed..da218fcd9eb554a8405ca72e84bcc0feb371194f:/cmd.c diff --git a/cmd.c b/cmd.c index 10761ce..420b3b1 100644 --- a/cmd.c +++ b/cmd.c @@ -1,7 +1,6 @@ /* cmd.c: the cgit command dispatcher * - * Copyright (C) 2008 Lars Hjemli - * Copyright (C) 2013 Jason A. Donenfeld . + * Copyright (C) 2006-2014 cgit Development Team * * Licensed under GNU General Public License v2 * (see COPYING for full license text) @@ -60,6 +59,11 @@ static void diff_fn(struct cgit_context *ctx) 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) { cgit_clone_info(ctx); @@ -93,7 +97,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 +154,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),