diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-06-27 14:30:07 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-06-27 14:30:07 -0700 |
commit | 91fc159745eccb0830c9719642d07617c8100b41 (patch) | |
tree | 898838ba0c60359f43bcd32ca23cf35a2f44d0bb | |
parent | 644daa9428323ecdef08dfce589aa386bd2d97d4 (diff) | |
parent | e5c29097826be86e2f18139491cdf9c830c7fa3e (diff) | |
download | git-91fc159745eccb0830c9719642d07617c8100b41.tar.gz git-91fc159745eccb0830c9719642d07617c8100b41.tar.xz |
Merge branch 'jk/add-i-custom-diff-algo'
* jk/add-i-custom-diff-algo:
add -i: add extra options at the right place in "diff" command line
add--interactive: respect diff.algorithm
-rwxr-xr-x | git-add--interactive.perl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/git-add--interactive.perl b/git-add--interactive.perl index d2c4ce6e1..75a991f7e 100755 --- a/git-add--interactive.perl +++ b/git-add--interactive.perl @@ -44,6 +44,8 @@ my ($diff_new_color) = 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; } |