diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2015-06-17 18:13:10 -0700 |
|---|---|---|
| committer | Edward Thomson <ethomson@github.com> | 2016-05-26 13:01:03 -0500 |
| commit | 3149ff6f663bf234679e02976d160917a6c70261 (patch) | |
| tree | 9ae45c43c99dc0698e696f6de146bb6600c6f5fd /src/diff_print.c | |
| parent | b88f1713d01e5cca5a296d564ae094dd8bc6a1f2 (diff) | |
| download | libgit2-3149ff6f663bf234679e02976d160917a6c70261.tar.gz | |
patch application: apply binary patches
Handle the application of binary patches. Include tests that
produce a binary patch (an in-memory `git_patch` object),
then enusre that the patch applies correctly.
Diffstat (limited to 'src/diff_print.c')
| -rw-r--r-- | src/diff_print.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/diff_print.c b/src/diff_print.c index dae9e341d..d18348462 100644 --- a/src/diff_print.c +++ b/src/diff_print.c @@ -415,6 +415,9 @@ static int diff_print_patch_file_binary( (error = diff_print_load_content(pi, delta)) < 0) return error; + if (binary->new_file.datalen == 0 && binary->old_file.datalen == 0) + return 0; + pre_binary_size = pi->buf->size; git_buf_printf(pi->buf, "GIT binary patch\n"); pi->line.num_lines++; |
