From c495cf02bac16e459f7c9e1740798646f12c00c5 Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Sat, 31 Jan 2009 10:40:40 +0100 Subject: Handle binary files in diffs This teaches all diff-related operations (i.e. ui-log, ui-diff and ui-patch) how to handle binary files. Signed-off-by: Lars Hjemli --- ui-log.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ui-log.c') diff --git a/ui-log.c b/ui-log.c index 3202848..ba2ab03 100644 --- a/ui-log.c +++ b/ui-log.c @@ -26,9 +26,14 @@ void count_lines(char *line, int size) void inspect_files(struct diff_filepair *pair) { + unsigned long old_size = 0; + unsigned long new_size = 0; + int binary = 0; + files++; if (ctx.repo->enable_log_linecount) - cgit_diff_files(pair->one->sha1, pair->two->sha1, count_lines); + cgit_diff_files(pair->one->sha1, pair->two->sha1, &old_size, + &new_size, &binary, count_lines); } void show_commit_decorations(struct commit *commit) -- cgit v1.2.3-70-g09d2