fetch: Strip usernames from url's before storing them
[gitweb.git] / git-add--interactive.perl
index 566e3710f5275bb751965744ff1d53ecaa809c97..60dd1b5be2b4f243c455d00385b99aa5f353bc49 100755 (executable)
@@ -804,6 +804,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>;