diff --git a/builtin-diff.c b/builtin-diff.c
index a090e298a55ef110a6fdd0e0dde54ea744a52f76..40e5c96f30e3d638c09b276805158bdba3ddde58 100644 (file)
--- a/builtin-diff.c
+++ b/builtin-diff.c
if (revs->max_count < 0 &&
(revs->diffopt.output_format & DIFF_FORMAT_PATCH))
revs->combine_merges = revs->dense_combined_merges = 1;
if (revs->max_count < 0 &&
(revs->diffopt.output_format & DIFF_FORMAT_PATCH))
revs->combine_merges = revs->dense_combined_merges = 1;
- /*
- * Backward compatibility wart - "diff-files -s" used to
- * defeat the common diff option "-s" which asked for
- * DIFF_FORMAT_NO_OUTPUT.
- */
- if (revs->diffopt.output_format == DIFF_FORMAT_NO_OUTPUT)
- revs->diffopt.output_format = DIFF_FORMAT_RAW;
return run_diff_files(revs, silent);
}
return run_diff_files(revs, silent);
}
{
struct diff_filespec *one, *two;
{
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;
!memcmp(old_sha1, new_sha1, 20))
return;