]> git.ipfire.org Git - thirdparty/git.git/blobdiff - tree-diff.c
Merge branch 'ab/detox-gettext-tests'
[thirdparty/git.git] / tree-diff.c
index 6ebad1a46f3e8986d26303b4a67870650293db72..7cebbb327e273aadd5106ddf2140637d39f1d4a4 100644 (file)
@@ -434,7 +434,7 @@ static struct combine_diff_path *ll_diff_tree_paths(
                if (diff_can_quit_early(opt))
                        break;
 
-               if (opt->max_changes && opt->num_changes > opt->max_changes)
+               if (opt->max_changes && diff_queued_diff.nr > opt->max_changes)
                        break;
 
                if (opt->pathspec.nr) {
@@ -521,7 +521,6 @@ static struct combine_diff_path *ll_diff_tree_paths(
 
                        /* t↓ */
                        update_tree_entry(&t);
-                       opt->num_changes++;
                }
 
                /* t > p[imin] */
@@ -539,7 +538,6 @@ static struct combine_diff_path *ll_diff_tree_paths(
                skip_emit_tp:
                        /* ∀ pi=p[imin]  pi↓ */
                        update_tp_entries(tp, nparent);
-                       opt->num_changes++;
                }
        }
 
@@ -557,7 +555,6 @@ struct combine_diff_path *diff_tree_paths(
        const struct object_id **parents_oid, int nparent,
        struct strbuf *base, struct diff_options *opt)
 {
-       opt->num_changes = 0;
        p = ll_diff_tree_paths(p, oid, parents_oid, nparent, base, opt);
 
        /*