mirror of
https://github.com/git/git
synced 2024-10-30 04:01:21 +00:00
Merge branch 'jk/add-i-diff-compact-heuristics' into maint
"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
This commit is contained in:
commit
52debb6831
1 changed files with 4 additions and 0 deletions
|
@ -45,6 +45,7 @@
|
||||||
my $normal_color = $repo->get_color("", "reset");
|
my $normal_color = $repo->get_color("", "reset");
|
||||||
|
|
||||||
my $diff_algorithm = $repo->config('diff.algorithm');
|
my $diff_algorithm = $repo->config('diff.algorithm');
|
||||||
|
my $diff_compaction_heuristic = $repo->config_bool('diff.compactionheuristic');
|
||||||
my $diff_filter = $repo->config('interactive.difffilter');
|
my $diff_filter = $repo->config('interactive.difffilter');
|
||||||
|
|
||||||
my $use_readkey = 0;
|
my $use_readkey = 0;
|
||||||
|
@ -749,6 +750,9 @@ sub parse_diff {
|
||||||
if (defined $diff_algorithm) {
|
if (defined $diff_algorithm) {
|
||||||
splice @diff_cmd, 1, 0, "--diff-algorithm=${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) {
|
if (defined $patch_mode_revision) {
|
||||||
push @diff_cmd, get_diff_reference($patch_mode_revision);
|
push @diff_cmd, get_diff_reference($patch_mode_revision);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue