2011-02-21 Ojan Vafai <ojan@chromium.org>
[WebKit-https.git] / Websites / bugs.webkit.org / code-review.js
index 00efb367459c3b6ce82200efb586f72d0897f3e3..397a2487def8262f7acc6816a1233791642369f5 100644 (file)
@@ -915,21 +915,13 @@ var CODE_REVIEW_UNITTEST;
   }
 
   function hunkStartingLine(patched_file, context, prev_line, hunk_num) {
   }
 
   function hunkStartingLine(patched_file, context, prev_line, hunk_num) {
-    var PATCH_FUZZ = 2;
     var current_line = -1;
     var last_context_line = context[context.length - 1];
     if (patched_file[prev_line] == last_context_line)
       current_line = prev_line + 1;
     else {
     var current_line = -1;
     var last_context_line = context[context.length - 1];
     if (patched_file[prev_line] == last_context_line)
       current_line = prev_line + 1;
     else {
-      for (var i = prev_line - PATCH_FUZZ; i < prev_line + PATCH_FUZZ; i++) {
-        if (patched_file[i] == last_context_line)
-          current_line = i + 1;
-      }
-
-      if (current_line == -1) {
-        console.log('Hunk #' + hunk_num + ' FAILED.');
-        return -1;
-      }
+      console.log('Hunk #' + hunk_num + ' FAILED.');
+      return -1;
     }
 
     // For paranoia sake, confirm the rest of the context matches;
     }
 
     // For paranoia sake, confirm the rest of the context matches;