diff options
author | Johan Herland <johan@herland.net> | 2010-06-11 03:15:27 (JST) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2010-06-19 20:00:07 (JST) |
commit | 6180e6169d6e87a3bea7e4da835dca17f93e5cfd (patch) | |
tree | 7caa053b419c75081179cc4a6056ce6533d01d99 /cgit.h | |
parent | a2cbd3c30b64a26b52b2003ba6569f3c083f4092 (diff) | |
download | cgit-6180e6169d6e87a3bea7e4da835dca17f93e5cfd.zip cgit-6180e6169d6e87a3bea7e4da835dca17f93e5cfd.tar.gz |
Add URL parameter 'context' for changing the number of context lines in diffs
The new ctx.qry.context variable is picked up by cgit_print_diff(), and
passed via cgit_diff_files() to Git's diff machinery.
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'cgit.h')
-rw-r--r-- | cgit.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -145,6 +145,7 @@ struct cgit_query { | |||
145 | char *sort; | 145 | char *sort; |
146 | int showmsg; | 146 | int showmsg; |
147 | int ssdiff; | 147 | int ssdiff; |
148 | int context; | ||
148 | char *vpath; | 149 | char *vpath; |
149 | }; | 150 | }; |
150 | 151 | ||
@@ -274,7 +275,7 @@ extern void *cgit_free_commitinfo(struct commitinfo *info); | |||
274 | extern int cgit_diff_files(const unsigned char *old_sha1, | 275 | extern int cgit_diff_files(const unsigned char *old_sha1, |
275 | const unsigned char *new_sha1, | 276 | const unsigned char *new_sha1, |
276 | unsigned long *old_size, unsigned long *new_size, | 277 | unsigned long *old_size, unsigned long *new_size, |
277 | int *binary, linediff_fn fn); | 278 | int *binary, int context, linediff_fn fn); |
278 | 279 | ||
279 | extern void cgit_diff_tree(const unsigned char *old_sha1, | 280 | extern void cgit_diff_tree(const unsigned char *old_sha1, |
280 | const unsigned char *new_sha1, | 281 | const unsigned char *new_sha1, |