diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-05-19 18:21:53 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-05-19 18:21:53 -0400 |
commit | 6ca672ed87a6f8812fa408ea0b3161e68ce2351e (patch) | |
tree | 4b399a129bb946db45186a3a7b6bd82ae4b58b31 /b4/command.py | |
parent | aaf4ae403c5acff9127e81446bb858719d3b120f (diff) | |
download | b4-6ca672ed87a6f8812fa408ea0b3161e68ce2351e.tar.gz |
Display range-diff by default
Don't make developers do copy-pasting unnecessarily. Switch to
outputting the diff by default, with flag options to save to file or
just show what needs to be done.
Additionally, adds caching to lookups and remember previously generated
fake-am ranges so we don't continuously generate loose objects on repeat
runs.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Diffstat (limited to 'b4/command.py')
-rw-r--r-- | b4/command.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/b4/command.py b/b4/command.py index 12900ff..80b072a 100644 --- a/b4/command.py +++ b/b4/command.py @@ -181,6 +181,12 @@ def cmd(): help='Do not use local cache') sp_diff.add_argument('-v', '--compare-versions', dest='wantvers', type=int, default=None, nargs='+', help='Compare specific versions instead of latest and one before that, e.g. -v 3 5') + sp_diff.add_argument('-n', '--no-diff', dest='nodiff', action='store_true', default=False, + help='Do not generate a diff, just show the command to do it') + sp_diff.add_argument('-o', '--output-diff', dest='outdiff', default=None, + help='Save diff into this file instead of outputting to stdout') + sp_diff.add_argument('-c', '--color', dest='color', action='store_true', default=False, + help='Force color output even when writing to file') sp_diff.set_defaults(func=cmd_diff) cmdargs = parser.parse_args() |