checkkconfigsymbols.py: support git's "^" syntax
authorValentin Rothberg <valentinrothberg@gmail.com>
Thu, 27 Oct 2016 12:34:57 +0000 (14:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Oct 2016 12:12:14 +0000 (08:12 -0400)
Support git's "^" syntax for diffing two commits, for instance via
"--diff HEAD^^^..HEAD".

Signed-off-by: Michael Ellermann <mpe@ellerman.id.au>
Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
scripts/checkkconfigsymbols.py

index a32e4da..3820f00 100755 (executable)
@@ -88,7 +88,7 @@ def parse_options():
     if args.commit and args.diff:
         sys.exit("Please specify only one option at once.")
 
-    if args.diff and not re.match(r"^[\w\-\.]+\.\.[\w\-\.]+$", args.diff):
+    if args.diff and not re.match(r"^[\w\-\.\^]+\.\.[\w\-\.\^]+$", args.diff):
         sys.exit("Please specify valid input in the following format: "
                  "\'commit1..commit2\'")