diff --git a/lib/fdiff/__main__.py b/lib/fdiff/__main__.py index 4c33387..05287d5 100644 --- a/lib/fdiff/__main__.py +++ b/lib/fdiff/__main__.py @@ -35,7 +35,7 @@ def run(argv): description="An OpenType table diff tool for fonts." ) parser.add_argument("--version", action="version", version=f"fdiff v{__version__}") - parser.add_argument("--git", type=str, nargs=7, action="git", help="Act as a diff driver for git (takes 7 parameters)") + parser.add_argument("--git", type=str, nargs=7, help="Act as a diff driver for git (takes 7 parameters)") parser.add_argument( "-c", "--color", @@ -64,11 +64,16 @@ def run(argv): "--nomp", action="store_true", help="Do not use multi process optimizations" ) parser.add_argument("--external", type=str, help="Run external diff tool command") - parser.add_argument("PREFILE", help="Font file path/URL 1") - parser.add_argument("POSTFILE", help="Font file path/URL 2") + # parser.add_argument("PREFILE", help="Font file path/URL 1") + # parser.add_argument("POSTFILE", help="Font file path/URL 2") args = parser.parse_args(argv) + if args.git: + print(args.git) + args.PREFILE = args.git[1] + args.POSTFILE = args.git[4] + # ///////////////////////////////////////////////////////// # # Validations @@ -118,11 +123,6 @@ def run(argv): # optimization use use_mp = not args.nomp - if args.git: - pass - # TODO: catch 2nd & 5th parameters and stuff them in args.PREFILE and - # args.POSTFILE respectively - if args.external: # ------------------------------ # External executable tool diff