mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
Merge branch 'dm/add-i-edit-abort'
* dm/add-i-edit-abort: add -i: revisit hunk on editor failure
This commit is contained in:
commit
2e2e91d6b2
|
@ -753,6 +753,10 @@ sub edit_hunk_manually {
|
|||
|| $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 a new issue