diff options
author | Lukas Fleischer | 2013-08-14 10:50:33 +0200 |
---|---|---|
committer | Jason A. Donenfeld | 2013-08-16 13:15:37 -0600 |
commit | 445f6ae8e3ef19b6ca70e741e934778bc4a05555 (patch) | |
tree | 5cf2b91951d050e1b7b2fc76a056de93ad5cd66f /cmd.c | |
parent | 9003cc172a4cbc6678f3d8003ae1ad3a55f62fed (diff) | |
download | cgit-445f6ae8e3ef19b6ca70e741e934778bc4a05555.tar.gz cgit-445f6ae8e3ef19b6ca70e741e934778bc4a05555.tar.bz2 cgit-445f6ae8e3ef19b6ca70e741e934778bc4a05555.zip |
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>
Diffstat (limited to 'cmd.c')
-rw-r--r-- | cmd.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -60,6 +60,11 @@ static void diff_fn(struct cgit_context *ctx) | |||
60 | cgit_print_diff(ctx->qry.sha1, ctx->qry.sha2, ctx->qry.path, 1, 0); | 60 | cgit_print_diff(ctx->qry.sha1, ctx->qry.sha2, ctx->qry.path, 1, 0); |
61 | } | 61 | } |
62 | 62 | ||
63 | static void rawdiff_fn(struct cgit_context *ctx) | ||
64 | { | ||
65 | cgit_print_diff(ctx->qry.sha1, ctx->qry.sha2, ctx->qry.path, 1, 1); | ||
66 | } | ||
67 | |||
63 | static void info_fn(struct cgit_context *ctx) | 68 | static void info_fn(struct cgit_context *ctx) |
64 | { | 69 | { |
65 | cgit_clone_info(ctx); | 70 | cgit_clone_info(ctx); |
@@ -150,6 +155,7 @@ struct cgit_cmd *cgit_get_cmd(struct cgit_context *ctx) | |||
150 | def_cmd(objects, 1, 0, 0, 1), | 155 | def_cmd(objects, 1, 0, 0, 1), |
151 | def_cmd(patch, 1, 0, 1, 0), | 156 | def_cmd(patch, 1, 0, 1, 0), |
152 | def_cmd(plain, 1, 0, 0, 0), | 157 | def_cmd(plain, 1, 0, 0, 0), |
158 | def_cmd(rawdiff, 1, 0, 1, 0), | ||
153 | def_cmd(refs, 1, 1, 0, 0), | 159 | def_cmd(refs, 1, 1, 0, 0), |
154 | def_cmd(repolist, 0, 0, 0, 0), | 160 | def_cmd(repolist, 0, 0, 0, 0), |
155 | def_cmd(snapshot, 1, 0, 0, 0), | 161 | def_cmd(snapshot, 1, 0, 0, 0), |