mirror of
https://github.com/git/git.git
synced 2024-11-25 02:44:48 +08:00
add -i: revisit hunk on editor failure
Similar to the behaviour for editing a commit message, let terminating the editor with a failure abort the current hunk edit and revisit the option selection for the hunk. Signed-off-by: Deskin Miller <deskinm@umich.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
30aa4fb15f
commit
1d398a0390
@ -753,6 +753,10 @@ EOF
|
||||
|| $ENV{VISUAL} || $ENV{EDITOR} || "vi";
|
||||
system('sh', '-c', $editor.' "$@"', $editor, $hunkfile);
|
||||
|
||||
if ($? != 0) {
|
||||
return undef;
|
||||
}
|
||||
|
||||
open $fh, '<', $hunkfile
|
||||
or die "failed to open hunk edit file for reading: " . $!;
|
||||
my @newtext = grep { !/^#/ } <$fh>;
|
||||
|
Loading…
Reference in New Issue
Block a user