X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-diff.c;h=40e5c96f30e3d638c09b276805158bdba3ddde58;hb=3899e7a329aabfc22eca9beb82599e1bb214b3d2;hp=82afce782d88a1f773599332910982ef804aea12;hpb=182a8dabd5f5f646608f3857f10f3ac18c3d1445;p=git.git 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;