Merge branch 'dm/add-i-edit-abort'

* dm/add-i-edit-abort:
  add -i: revisit hunk on editor failure
maint
Junio C Hamano 2009-03-05 15:41:39 -08:00
commit 2e2e91d6b2
1 changed files with 4 additions and 0 deletions

View File

@ -753,6 +753,10 @@ EOF
|| $ENV{VISUAL} || $ENV{EDITOR} || "vi"; || $ENV{VISUAL} || $ENV{EDITOR} || "vi";
system('sh', '-c', $editor.' "$@"', $editor, $hunkfile); system('sh', '-c', $editor.' "$@"', $editor, $hunkfile);


if ($? != 0) {
return undef;
}

open $fh, '<', $hunkfile open $fh, '<', $hunkfile
or die "failed to open hunk edit file for reading: " . $!; or die "failed to open hunk edit file for reading: " . $!;
my @newtext = grep { !/^#/ } <$fh>; my @newtext = grep { !/^#/ } <$fh>;