]> code.ossystems Code Review - openembedded-core.git/commitdiff
scripts/patchreview: tighten patch detection
authorRoss Burton <ross.burton@intel.com>
Mon, 15 Oct 2018 20:30:37 +0000 (21:30 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 16 Oct 2018 19:25:37 +0000 (20:25 +0100)
Only look in recipes-* folders for patches, to stop finding patches in
e.g. meta/lib/oeqa/manual.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/contrib/patchreview.py

index 1086c95f67fde8f30562e239cb747ffe595f9f8c..a4d5ba686763afd69c4468d94e5d80732600694b 100755 (executable)
@@ -203,7 +203,7 @@ if __name__ == "__main__":
 
     if args.directory:
         os.chdir(args.directory)
-    patches = subprocess.check_output(("git", "ls-files", "*.patch", "*.diff")).decode("utf-8").split()
+    patches = subprocess.check_output(("git", "ls-files", "recipes-*/**/*.patch", "recipes-*/**/*.diff")).decode("utf-8").split()
     results = patchreview(patches)
     analyse(results, want_blame=args.blame, verbose=args.verbose)
     if args.histogram: