aboutsummaryrefslogtreecommitdiff
path: root/builtin-diff.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-diff.c')
-rw-r--r--builtin-diff.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin-diff.c b/builtin-diff.c
index 82afce782..40e5c96f3 100644
--- a/builtin-diff.c
+++ b/builtin-diff.c
@@ -68,8 +68,7 @@ static void stuff_change(struct diff_options *opt,
{
struct diff_filespec *one, *two;
- if (memcmp(null_sha1, old_sha1, 20) &&
- memcmp(null_sha1, new_sha1, 20) &&
+ if (!is_null_sha1(old_sha1) && !is_null_sha1(new_sha1) &&
!memcmp(old_sha1, new_sha1, 20))
return;