Browse Source

Merge branch 'jk/diff-memuse-optim-with-stat-unmatch'

Reduce memory usage during "diff --quiet" in a worktree with too
many stat-unmatched paths.

* jk/diff-memuse-optim-with-stat-unmatch:
  diff: discard blob data from stat-unmatched pairs
maint
Junio C Hamano 5 years ago
parent
commit
0cd0afc9c6
  1. 5
      diff.c

5
diff.c

@ -6763,8 +6763,11 @@ void diff_change(struct diff_options *options, @@ -6763,8 +6763,11 @@ void diff_change(struct diff_options *options,
return;

if (options->flags.quick && options->skip_stat_unmatch &&
!diff_filespec_check_stat_unmatch(options->repo, p))
!diff_filespec_check_stat_unmatch(options->repo, p)) {
diff_free_filespec_data(p->one);
diff_free_filespec_data(p->two);
return;
}

options->flags.has_changes = 1;
}

Loading…
Cancel
Save