Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge remote-tracking branch 'ko/maint' into jc/diff-index-quick-exit-early
[gitweb.git]
/
diff.c
diff --git
a/diff.c
b/diff.c
index 9a8012e362fe2bc08d4ecce21e68972579c3693b..7d1cdea310b95a93e63ab834475951d8c082c6c2 100644
(file)
--- a/
diff.c
+++ b/
diff.c
@@
-4288,6
+4288,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?
*