mirror of
https://git.zx2c4.com/cgit
synced 2024-11-22 08:28:42 +00:00
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>
This commit is contained in:
parent
9003cc172a
commit
445f6ae8e3
6
cmd.c
6
cmd.c
@ -60,6 +60,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);
|
||||
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user