author | Johan Herland <johan@herland.net> | 2010-06-24 15:52:57 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2010-07-18 08:53:48 (UTC) |
commit | 2cc8b99f083014c58d8937bfa4dcd2bc47cd7e58 (patch) (unidiff) | |
tree | 48d555b15c0432bb98712d746100bf6c0fe2be4a /cgit.h | |
parent | d20313e3daf855ee5d4808e050f54614c200d7b1 (diff) | |
download | cgit-2cc8b99f083014c58d8937bfa4dcd2bc47cd7e58.zip cgit-2cc8b99f083014c58d8937bfa4dcd2bc47cd7e58.tar.gz cgit-2cc8b99f083014c58d8937bfa4dcd2bc47cd7e58.tar.bz2 |
Add URL parameter 'ignorews' for optionally ignoring whitespace in diffs
The new ctx.qry.ignorews variable is passed via cgit_diff_files() and
cgit_diff_tree() to Git's diff machinery. This is equivalent to passing
--ignore-all-space to 'git diff'.
Signed-off-by: Johan Herland <johan@herland.net>
-rw-r--r-- | cgit.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -148,2 +148,3 @@ struct cgit_query { | |||
148 | int context; | 148 | int context; |
149 | int ignorews; | ||
149 | char *vpath; | 150 | char *vpath; |
@@ -277,3 +278,4 @@ extern int cgit_diff_files(const unsigned char *old_sha1, | |||
277 | unsigned long *old_size, unsigned long *new_size, | 278 | unsigned long *old_size, unsigned long *new_size, |
278 | int *binary, int context, linediff_fn fn); | 279 | int *binary, int context, int ignorews, |
280 | linediff_fn fn); | ||
279 | 281 | ||
@@ -281,3 +283,3 @@ extern void cgit_diff_tree(const unsigned char *old_sha1, | |||
281 | const unsigned char *new_sha1, | 283 | const unsigned char *new_sha1, |
282 | filepair_fn fn, const char *prefix); | 284 | filepair_fn fn, const char *prefix, int ignorews); |
283 | 285 | ||