Add map_user() and clear_mailmap() to mailmap
[gitweb.git] / git-add--interactive.perl
index 30ddab293b4b4eb2862d068b352e8ccedc31ea5e..3bf0cda4eef6714b09df0360d48c12796598071a 100755 (executable)
@@ -948,7 +948,7 @@ sub patch_update_file {
                        $other .= ',J';
                }
                if ($num > 1) {
-                       $other .= '/g';
+                       $other .= ',g';
                }
                for ($i = 0; $i < $num; $i++) {
                        if (!defined $hunk[$i]{USE}) {
@@ -994,6 +994,9 @@ sub patch_update_file {
                                        }
                                        print "go to which hunk$extra? ";
                                        $response = <STDIN>;
+                                       if (!defined $response) {
+                                               $response = '';
+                                       }
                                        chomp $response;
                                }
                                if ($response !~ /^\s*\d+\s*$/) {