summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 30aa4fb)
raw | patch | inline | side by side (parent: 30aa4fb)
author | Deskin Miller <deskinm@umich.edu> | |
Thu, 12 Feb 2009 05:19:41 +0000 (00:19 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 12 Feb 2009 07:51:15 +0000 (23:51 -0800) |
Similar to the behaviour for editing a commit message, let terminating
the editor with a failure abort the current hunk edit and revisit the
option selection for the hunk.
Signed-off-by: Deskin Miller <deskinm@umich.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
the editor with a failure abort the current hunk edit and revisit the
option selection for the hunk.
Signed-off-by: Deskin Miller <deskinm@umich.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-add--interactive.perl | patch | blob | history |
index 5f129a42030917bc5dcab67aeaf67a5f00c17677..f7b0761732f4a752cc91fd7ca02e3a3e07dcfc17 100755 (executable)
|| $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>;