Support git's "^" syntax for diffing two commits, for instance via "--diff HEAD^^^..HEAD".
Unified · Split
| @@ -88,7 +88,7 @@ def parse_options(): · 87 unmodified lines | ||
| 88 | 88 | if args.commit and args.diff: |
| 89 | 89 | sys.exit("Please specify only one option at once.") |
| 90 | 90 | |
| 91 | − if args.diff and not re.match(r"^[\w\-\.]+\.\.[\w\-\.]+$", args.diff): | |
| 91 | + if args.diff and not re.match(r"^[\w\-\.\^]+\.\.[\w\-\.\^]+$", args.diff): | |
| 92 | 92 | sys.exit("Please specify valid input in the following format: " |
| 93 | 93 | "\'commit1..commit2\'") |
| 94 | 94 | |