add -p: fix 2.17.0-rc* regression due to moved code
[gitweb.git] / git-add--interactive.perl
index d9d8ff3090e914421ab67071117789f6b3554475..811b3730c0798f98fede7a9a47538ec55aa81b49 100755 (executable)
@@ -1492,7 +1492,7 @@ sub patch_update_file {
                                        error_msg __("No other hunks to search\n");
                                        next;
                                }
-                               if ($1 eq "") {
+                               if ($regex eq "") {
                                        print colored $prompt_color, __("search for regex? ");
                                        $regex = <STDIN>;
                                        if (defined $regex) {