Git 1.7.6-rc1
[gitweb.git] / diff.c
diff --git a/diff.c b/diff.c
index 8f4815bfd7d798f2a99131cd2e79155e933c7876..61bedaed57216cadaf2716ef7aa0d63889571f8a 100644 (file)
--- 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?
  *