diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-03-16 13:56:42 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-03-16 13:56:42 -0700 |
commit | abe62a403f2d3fce004f57e0e7371523761e723f (patch) | |
tree | d71da633bee34045e69b419df2def7236307769c /git-add--interactive.perl | |
parent | 68e12d7d97e1c1a853ac4c603b06afa051cf1276 (diff) | |
parent | c852bd54bd87fdcdc825f5d45c26aa745be13ba6 (diff) | |
download | git-abe62a403f2d3fce004f57e0e7371523761e723f.tar.gz git-abe62a403f2d3fce004f57e0e7371523761e723f.tar.xz |
Merge branch 'jk/add-i-patch-do-prompt' into maint
The patch subcommand of "git add -i" was meant to have paths
selection prompt just like other subcommand, unlike "git add -p"
directly jumps to hunk selection. Recently, this was broken and
"add -i" lost the paths selection dialog, but it now has been
fixed.
* jk/add-i-patch-do-prompt:
add--interactive: fix missing file prompt for patch mode with "-i"
Diffstat (limited to 'git-add--interactive.perl')
-rwxr-xr-x | git-add--interactive.perl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/git-add--interactive.perl b/git-add--interactive.perl index 982593c89..f5c816e27 100755 --- a/git-add--interactive.perl +++ b/git-add--interactive.perl @@ -92,7 +92,7 @@ sub colored { } # command line options -my $cmd; +my $patch_mode_only; my $patch_mode; my $patch_mode_revision; @@ -1299,7 +1299,7 @@ sub patch_update_cmd { } return 0; } - if ($patch_mode) { + if ($patch_mode_only) { @them = @mods; } else { @@ -1721,7 +1721,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); @@ -1758,7 +1758,7 @@ sub main_loop { process_args(); refresh(); -if ($cmd) { +if ($patch_mode_only) { patch_update_cmd(); } else { |