osbuild-dev: add --simple to diff
This option switches to `diff -u` instead of `vimdiff`.
This commit is contained in:
parent
dce36ab420
commit
b9876690f6
1 changed files with 2 additions and 1 deletions
|
|
@ -194,6 +194,7 @@ def pretty_print(
|
|||
@man.command(name="diff")
|
||||
def pretty_diff(
|
||||
manifest_paths: list[str],
|
||||
simple: bool = typer.Option(False, help="Use `diff` instead of `vimdiff`"),
|
||||
ignore_stage: list[str] = typer.Option([]),
|
||||
resolve_sources: bool = typer.Option(
|
||||
True, help="Resolve content hashes of sources to their names."
|
||||
|
|
@ -225,7 +226,7 @@ def pretty_diff(
|
|||
|
||||
paths.append(path)
|
||||
|
||||
subprocess.run(["vimdiff"] + paths, check=True)
|
||||
subprocess.run((["diff", "-u"] if simple else ["vimdiff"]) + paths)
|
||||
|
||||
return 0
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue