all repos — cgit @ 445f6ae8e3ef19b6ca70e741e934778bc4a05555

a hyperfast web frontend for git written in c

cmd.c: Add a "rawdiff" command

This can be used to generate raw diffs between arbitrary revisions using
something like

     /rawdiff/?id=v0.9&id2=v0.9.1

Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
Lukas Fleischer cgit@cryptocrack.de
Wed, 14 Aug 2013 10:50:33 +0200
commit

445f6ae8e3ef19b6ca70e741e934778bc4a05555

parent

9003cc172a4cbc6678f3d8003ae1ad3a55f62fed

1 files changed, 6 insertions(+), 0 deletions(-)

jump to
M cmd.ccmd.c

@@ -60,6 +60,11 @@ {

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);

@@ -150,6 +155,7 @@ def_cmd(ls_cache, 0, 0, 0, 0),

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),