diff options
Diffstat (limited to 'git-add--interactive.perl')
-rwxr-xr-x | git-add--interactive.perl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/git-add--interactive.perl b/git-add--interactive.perl index 064d4c68d0..def062a9e2 100755 --- a/git-add--interactive.perl +++ b/git-add--interactive.perl @@ -802,6 +802,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>; |