Browse Source

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

* dm/add-i-edit-abort:
  add -i: revisit hunk on editor failure
maint
Junio C Hamano 16 years ago
parent
commit
2e2e91d6b2
  1. 4
      git-add--interactive.perl

4
git-add--interactive.perl

@ -753,6 +753,10 @@ EOF @@ -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…
Cancel
Save