Move write_shallow_commits to fetch-pack.c
[gitweb.git] / tree-diff.c
index 3f4072525b9489a86b2231748abe13c611e05274..b3cc2e4753447d4734ed08a70e3396771257dced 100644 (file)
@@ -142,8 +142,7 @@ int diff_tree(struct tree_desc *t1, struct tree_desc *t2,
        strbuf_add(&base, base_str, baselen);
 
        for (;;) {
-               if (DIFF_OPT_TST(opt, QUICK) &&
-                   DIFF_OPT_TST(opt, HAS_CHANGES))
+               if (diff_can_quit_early(opt))
                        break;
                if (opt->pathspec.nr) {
                        skip_uninteresting(t1, &base, opt, &t1_match);