Merge branch 'rs/diff-quiet-no-rename'

As "git diff --quiet" only cares about the existence of any
changes, disable rename/copy detection to skip more expensive
processing whose result will be discarded anyway.

* rs/diff-quiet-no-rename:
  diff: disable rename detection with --quiet
This commit is contained in:
Junio C Hamano
2025-11-21 09:14:15 -08:00
2 changed files with 12 additions and 0 deletions

2
diff.c
View File

@@ -4987,6 +4987,8 @@ void diff_setup_done(struct diff_options *options)
if (options->flags.quick) {
options->output_format = DIFF_FORMAT_NO_OUTPUT;
options->flags.exit_with_status = 1;
options->detect_rename = 0;
options->flags.find_copies_harder = 0;
}
/*