Merge branch 'rs/diff-exit-code-binary'

"git diff --exit-code" ignored modified binary files, which has
been corrected.

* rs/diff-exit-code-binary:
  diff: report modified binary files as changes in builtin_diff()
This commit is contained in:
Junio C Hamano
2024-09-25 18:24:51 -07:00
2 changed files with 9 additions and 0 deletions

1
diff.c
View File

@ -3675,6 +3675,7 @@ static void builtin_diff(const char *name_a,
emit_diff_symbol(o, DIFF_SYMBOL_BINARY_FILES,
sb.buf, sb.len, 0);
strbuf_release(&sb);
o->found_changes = 1;
goto free_ab_and_return;
}
if (fill_mmfile(o->repo, &mf1, one) < 0 ||