mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-30 23:10:41 +01:00
diff: address comments from review
* OSError -> FileNotFoundError * Make `a_ref` optional * Use absolute imports for unrelated packages * Relpath: `str(output.path_info)` -> `str(output)` * `a_ref` defaults to `HEAD` at the signature and parser level
This commit is contained in:
+5
-2
@@ -32,13 +32,16 @@ def add_parser(subparsers, parent_parser):
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
)
|
||||
diff_parser.add_argument(
|
||||
"a_ref", help="Git reference from which diff calculates"
|
||||
"a_ref",
|
||||
help="Git reference from which diff calculates (defaults to HEAD)",
|
||||
nargs="?",
|
||||
default="HEAD"
|
||||
)
|
||||
diff_parser.add_argument(
|
||||
"b_ref",
|
||||
help=(
|
||||
"Git reference until which diff calculates, if omitted "
|
||||
"diff shows the difference between current HEAD and a_ref"
|
||||
"diff shows the difference between the working tree and a_ref"
|
||||
),
|
||||
nargs="?",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user