mirror of
https://git.zx2c4.com/cgit
synced 2025-06-28 20:40:22 +02:00
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 <hjemli@gmail.com>
This commit is contained in:
parent
d6174b7aab
commit
c495cf02ba
5 changed files with 52 additions and 7 deletions
7
ui-log.c
7
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue