提交 1d398a03 编写于 作者: D Deskin Miller 提交者: Junio C Hamano

add -i: revisit hunk on editor failure

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: NDeskin Miller <deskinm@umich.edu>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 30aa4fb1
......@@ -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>;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册