diff mbox

[ovs-dev,v3,6/7] checkpatch: filename from hunks fix

Message ID 20170501194443.10029-7-aconole@redhat.com
State Superseded
Headers show

Commit Message

Aaron Conole May 1, 2017, 7:44 p.m. UTC
Filenames that come from the hunks match include the git-ified 'b/'
prefix, which makes jumping to the error file that much harder.  This
patch corrects that by simply skipping those bytes.

Signed-off-by: Aaron Conole <aconole@redhat.com>
---
 utilities/checkpatch.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
index 6eb1e1f..acf6f15 100755
--- a/utilities/checkpatch.py
+++ b/utilities/checkpatch.py
@@ -300,7 +300,7 @@  def ovs_checkpatch_parse(text):
         elif parse == 2:
             newfile = hunks.match(line)
             if newfile:
-                current_file = newfile.group(2)
+                current_file = newfile.group(2)[2:]
                 print_file_name = current_file
                 continue
             reset_line_number = hunk_differences.match(line)