Fix git cl format --diff --dry-run for Java files
A recent change added --diff support for Java files in git cl format, but unfortunately it broke the behavior when both --dry-run and --diff are passed, and made git cl format indicate that all changed files need to be reformatted. Fix so that --diff overrides --dry-run when running google-java-format, as passing --dry-run makes the formatter only output file names which then confused the diff creation code. This makes behavior for Java in line with C++ where --dry-run doesn't change much if --diff is used. Change-Id: I7f8eecb13064a0046935489e6c5cf3af566f7f56 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5357818 Reviewed-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Tomasz Śniatowski <tomasz.sniatowski@xperi.com>changes/18/5357818/2
parent
6ec5a9ab60
commit
fe6a359a80
Loading…
Reference in New Issue