Skip to content

Commit

Permalink
Merge branch 'dm/add-i-edit-abort'
Browse files Browse the repository at this point in the history
* dm/add-i-edit-abort:
  add -i: revisit hunk on editor failure
  • Loading branch information
Junio C Hamano committed Mar 5, 2009
2 parents 229e658 + 1d398a0 commit 2e2e91d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions git-add--interactive.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand Down

0 comments on commit 2e2e91d

Please sign in to comment.