X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=diff.c;h=61bedaed57216cadaf2716ef7aa0d63889571f8a;hb=13b70d2ad96a79fb439c6b4fc0e8058b1762bae2;hp=8f4815bfd7d798f2a99131cd2e79155e933c7876;hpb=fb674d767180354d9ad3e69f1d41bee98df6bfe9;p=git.git diff --git a/diff.c b/diff.c index 8f4815bfd..61bedaed5 100644 --- a/diff.c +++ b/diff.c @@ -4456,6 +4456,13 @@ int diff_result_code(struct diff_options *opt, int status) return result; } +int diff_can_quit_early(struct diff_options *opt) +{ + return (DIFF_OPT_TST(opt, QUICK) && + !opt->filter && + DIFF_OPT_TST(opt, HAS_CHANGES)); +} + /* * Shall changes to this submodule be ignored? *