Browse Source

Merge branch 'jk/add-i-diff-compact-heuristics'

"git add -i/-p" learned to honor diff.compactionHeuristic
experimental knob, so that the user can work on the same hunk split
as "git diff" output.

* jk/add-i-diff-compact-heuristics:
  add--interactive: respect diff.compactionHeuristic
maint
Junio C Hamano 9 years ago
parent
commit
054d949ffb
  1. 4
      git-add--interactive.perl

4
git-add--interactive.perl

@ -45,6 +45,7 @@ my ($diff_new_color) = @@ -45,6 +45,7 @@ my ($diff_new_color) =
my $normal_color = $repo->get_color("", "reset");

my $diff_algorithm = $repo->config('diff.algorithm');
my $diff_compaction_heuristic = $repo->config_bool('diff.compactionheuristic');
my $diff_filter = $repo->config('interactive.difffilter');

my $use_readkey = 0;
@ -749,6 +750,9 @@ sub parse_diff { @@ -749,6 +750,9 @@ sub parse_diff {
if (defined $diff_algorithm) {
splice @diff_cmd, 1, 0, "--diff-algorithm=${diff_algorithm}";
}
if ($diff_compaction_heuristic) {
splice @diff_cmd, 1, 0, "--compaction-heuristic";
}
if (defined $patch_mode_revision) {
push @diff_cmd, get_diff_reference($patch_mode_revision);
}

Loading…
Cancel
Save