From: Junio C Hamano Date: Thu, 20 Apr 2017 04:37:17 +0000 (-0700) Subject: Merge branch 'va/i18n-perl-scripts' X-Git-Tag: v2.13.0-rc0~11 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/34130cc06b478d824cc428c33796f620dd0c7424?hp=-c Merge branch 'va/i18n-perl-scripts' Message fix. * va/i18n-perl-scripts: git-add--interactive.perl: add missing dot in a message --- 34130cc06b478d824cc428c33796f620dd0c7424 diff --combined git-add--interactive.perl index 77b4ed53a8,7706d3874a..709a5f6ce6 --- a/git-add--interactive.perl +++ b/git-add--interactive.perl @@@ -46,7 -46,7 +46,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_indent_heuristic = $repo->config_bool('diff.indentheuristic'); my $diff_filter = $repo->config('interactive.difffilter'); my $use_readkey = 0; @@@ -92,7 -92,7 +92,7 @@@ sub colored } # command line options -my $cmd; +my $patch_mode_only; my $patch_mode; my $patch_mode_revision; @@@ -275,11 -275,20 +275,11 @@@ sub list_modified my ($only) = @_; my (%data, @return); my ($add, $del, $adddel, $file); - my @tracked = (); - - if (@ARGV) { - @tracked = map { - chomp $_; - unquote_path($_); - } run_cmd_pipe(qw(git ls-files --), @ARGV); - return if (!@tracked); - } my $reference = get_diff_reference($patch_mode_revision); for (run_cmd_pipe(qw(git diff-index --cached --numstat --summary), $reference, - '--', @tracked)) { + '--', @ARGV)) { if (($add, $del, $file) = /^([-\d]+) ([-\d]+) (.*)/) { my ($change, $bin); @@@ -304,7 -313,7 +304,7 @@@ } } - for (run_cmd_pipe(qw(git diff-files --numstat --summary --raw --), @tracked)) { + for (run_cmd_pipe(qw(git diff-files --numstat --summary --raw --), @ARGV)) { if (($add, $del, $file) = /^([-\d]+) ([-\d]+) (.*)/) { $file = unquote_path($file); @@@ -730,8 -739,8 +730,8 @@@ 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 ($diff_indent_heuristic) { + splice @diff_cmd, 1, 0, "--indent-heuristic"; } if (defined $patch_mode_revision) { push @diff_cmd, get_diff_reference($patch_mode_revision); @@@ -1040,7 -1049,7 +1040,7 @@@ marked for unstaging.") marked for applying."), checkout_index => N__( "If the patch applies cleanly, the edited hunk will immediately be - marked for discarding"), + marked for discarding."), checkout_head => N__( "If the patch applies cleanly, the edited hunk will immediately be marked for discarding."), @@@ -1290,7 -1299,7 +1290,7 @@@ sub patch_update_cmd } return 0; } - if ($patch_mode) { + if ($patch_mode_only) { @them = @mods; } else { @@@ -1669,7 -1678,7 +1669,7 @@@ status - show paths with change update - add working tree state to the staged set of changes revert - revert staged set of changes back to the HEAD version patch - pick hunks and update selectively -diff - view diff between HEAD and index +diff - view diff between HEAD and index add untracked - add contents of untracked files to the staged set of changes EOF } @@@ -1712,7 -1721,7 +1712,7 @@@ sub process_args die sprintf(__("invalid argument %s, expecting --"), $arg) unless $arg eq "--"; %patch_mode_flavour = %{$patch_modes{$patch_mode}}; - $cmd = 1; + $patch_mode_only = 1; } elsif ($arg ne "--") { die sprintf(__("invalid argument %s, expecting --"), $arg); @@@ -1749,7 -1758,7 +1749,7 @@@ sub main_loop process_args(); refresh(); -if ($cmd) { +if ($patch_mode_only) { patch_update_cmd(); } else {