Code

Merge branch 'maint'
[git.git] / builtin-diff.c
index 82afce782d88a1f773599332910982ef804aea12..874f773421620642425e67f650de2a34396f1c0f 100644 (file)
@@ -68,9 +68,8 @@ 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) &&
-           !memcmp(old_sha1, new_sha1, 20))
+       if (!is_null_sha1(old_sha1) && !is_null_sha1(new_sha1) &&
+           !hashcmp(old_sha1, new_sha1))
                return;
 
        if (opt->reverse_diff) {