diff options
| author | Kevin Swinton <kevin.swinton@gmail.com> | 2020-04-18 11:32:56 +0100 |
|---|---|---|
| committer | Kevin Swinton <kevin.swinton@gmail.com> | 2020-04-18 11:32:56 +0100 |
| commit | e72ade87fdb3acf3cbb6bf6d52cd774d924e0e2c (patch) | |
| tree | f78524e116f005e04014f12cc732f88d2103adf8 /src/patch_generate.c | |
| parent | 918a7d19553a9a4181bf1561b8b828a5f82e60e0 (diff) | |
| download | libgit2-e72ade87fdb3acf3cbb6bf6d52cd774d924e0e2c.tar.gz | |
Fix binary diff showing /dev/null
Fixes issue where a changed binary file's content in the working
tree isn't displayed correctly, instead showing an oid of zero,
and with its path being reported incorrectly as "/dev/null".
Diffstat (limited to 'src/patch_generate.c')
| -rw-r--r-- | src/patch_generate.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/patch_generate.c b/src/patch_generate.c index 18256d076..6dd61c18f 100644 --- a/src/patch_generate.c +++ b/src/patch_generate.c @@ -209,9 +209,7 @@ static int patch_generated_load(git_patch_generated *patch, git_patch_generated_ if ((error = git_diff_file_content__load( &patch->ofile, &patch->base.diff_opts)) < 0 || - should_skip_binary(patch, patch->ofile.file)) - goto cleanup; - if ((error = git_diff_file_content__load( + (error = git_diff_file_content__load( &patch->nfile, &patch->base.diff_opts)) < 0 || should_skip_binary(patch, patch->nfile.file)) goto cleanup; |
