Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
9293e165
Unverified
Commit
9293e165
authored
Oct 04, 2020
by
Edward Thomson
Committed by
GitHub
Oct 04, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5494 from kevinjswinton/master
Fix binary diff showing /dev/null
parents
e8ab3db9
e72ade87
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
7 deletions
+3
-7
src/patch_generate.c
+1
-3
tests/diff/format_email.c
+1
-2
tests/diff/stats.c
+1
-2
No files found.
src/patch_generate.c
View file @
9293e165
...
...
@@ -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
;
...
...
tests/diff/format_email.c
View file @
9293e165
...
...
@@ -487,7 +487,7 @@ void test_diff_format_email__binary(void)
"Subject: [PATCH] Modified binary file
\n
"
\
"
\n
"
\
"---
\n
"
\
" binary.bin | Bin 3 ->
0
bytes
\n
"
\
" binary.bin | Bin 3 ->
5
bytes
\n
"
\
" 1 file changed, 0 insertions(+), 0 deletions(-)
\n
"
\
"
\n
"
\
"diff --git a/binary.bin b/binary.bin
\n
"
\
...
...
@@ -496,7 +496,6 @@ void test_diff_format_email__binary(void)
"--
\n
"
\
"libgit2 "
LIBGIT2_VERSION
"
\n
"
\
"
\n
"
;
/* TODO: Actually 0 bytes here should be 5!. Seems like we don't load the new content for binary files? */
opts
.
summary
=
"Modified binary file"
;
...
...
tests/diff/stats.c
View file @
9293e165
...
...
@@ -298,9 +298,8 @@ void test_diff_stats__binary(void)
{
git_buf
buf
=
GIT_BUF_INIT
;
const
char
*
stat
=
" binary.bin | Bin 3 ->
0
bytes
\n
"
" binary.bin | Bin 3 ->
5
bytes
\n
"
" 1 file changed, 0 insertions(+), 0 deletions(-)
\n
"
;
/* TODO: Actually 0 bytes here should be 5!. Seems like we don't load the new content for binary files? */
diff_stats_from_commit_oid
(
&
_stats
,
"8d7523f6fcb2404257889abe0d96f093d9f524f9"
,
false
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment