]> git.scripts.mit.edu Git - git.git/blobdiff - git-add--interactive.perl
repack: make parsed string options const-correct
[git.git] / git-add--interactive.perl
index d2c4ce6e1e88f543bd06cd8347e8949fef11a381..75a991f7ec8a2e4926cb925ad9ff23be2f6aedeb 100755 (executable)
@@ -44,6 +44,8 @@
 
 my $normal_color = $repo->get_color("", "reset");
 
+my $diff_algorithm = $repo->config('diff.algorithm');
+
 my $use_readkey = 0;
 my $use_termcap = 0;
 my %term_escapes;
@@ -731,6 +733,9 @@ sub run_git_apply {
 sub parse_diff {
        my ($path) = @_;
        my @diff_cmd = split(" ", $patch_mode_flavour{DIFF});
+       if (defined $diff_algorithm) {
+               splice @diff_cmd, 1, 0, "--diff-algorithm=${diff_algorithm}";
+       }
        if (defined $patch_mode_revision) {
                push @diff_cmd, $patch_mode_revision;
        }