Merge branch 'ci/forbid-unwanted-current-branch-update'
[gitweb.git] / diff-lib.c
index c7626554b85b7be3491eeaca32e534b6765dc5aa..f8454dd2918dc74bee43d9f2faa1837cc5665abd 100644 (file)
@@ -434,8 +434,13 @@ static int oneway_diff(struct cache_entry **src, struct unpack_trees_options *o)
        if (tree == o->df_conflict_entry)
                tree = NULL;
 
-       if (ce_path_match(idx ? idx : tree, &revs->prune_data))
+       if (ce_path_match(idx ? idx : tree, &revs->prune_data)) {
                do_oneway_diff(o, idx, tree);
+               if (diff_can_quit_early(&revs->diffopt)) {
+                       o->exiting_early = 1;
+                       return -1;
+               }
+       }
 
        return 0;
 }