make git_diff_stats_to_buf not show 0 insertions or 0 deletions · nodegit/libgit2@dc5cfdb · GitHub
Skip to content

Commit dc5cfdb

Browse files
Sim DomingoEdward Thomson
authored andcommitted
make git_diff_stats_to_buf not show 0 insertions or 0 deletions
1 parent f0ee795 commit dc5cfdb

12 files changed

Lines changed: 58 additions & 13 deletions

‎src/diff_stats.c‎

Lines changed: 18 additions & 10 deletions

‎tests/diff/format_email.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ void test_diff_format_email__with_message(void)
112112
"Also test if new paragraphs are included correctly.\n" \
113113
"---\n" \
114114
" file3.txt | 1 +\n" \
115-
" 1 file changed, 1 insertion(+), 0 deletions(-)\n" \
115+
" 1 file changed, 1 insertion(+)\n" \
116116
"\n" \
117117
"diff --git a/file3.txt b/file3.txt\n" \
118118
"index 9a2d780..7309653 100644\n" \
@@ -155,7 +155,7 @@ void test_diff_format_email__multiple(void)
155155
"---\n" \
156156
" file2.txt | 5 +++++\n" \
157157
" file3.txt | 5 +++++\n" \
158-
" 2 files changed, 10 insertions(+), 0 deletions(-)\n" \
158+
" 2 files changed, 10 insertions(+)\n" \
159159
" create mode 100644 file2.txt\n" \
160160
" create mode 100644 file3.txt\n" \
161161
"\n" \

‎tests/diff/stats.c‎

Lines changed: 36 additions & 0 deletions
0 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)