Skip to content

Commit

Permalink
Merge branch 'jk/add-i-custom-diff-algo'
Browse files Browse the repository at this point in the history
* jk/add-i-custom-diff-algo:
  add -i: add extra options at the right place in "diff" command line
  add--interactive: respect diff.algorithm
  • Loading branch information
gitster committed Jun 27, 2013
2 parents 644daa9 + e5c2909 commit 91fc159
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions git-add--interactive.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 91fc159

Please sign in to comment.