git_cl: sets opts.full if format-full-by-default is set
settings.GetFormatFullByDefault() looks up a git config to find if format-full-by-default is set. RunClangFormatDiff() and RunGoogleJavaFormat() uses the function to determine whether it should format a given document full or not, and it makes it difficult to make the wrapper functions git-op free. To remove git dependencies from the Run functions, this CL simply sets opts.full if the default is set. Note that this CL makes a behaviour change to the Python Runner. RunYapf() doesn't honor settings.GetFormatFullByDefault(). It just looks at opts.full only to determine how to format the file. If this CL is landed, RunYapf() will take account of the git config to determine whether it should format the full document or a part. Bug: 386840832 Change-Id: Ibd7210e20897d354bd3eddf84927cf22105b7255 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6256552 Reviewed-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Scott Lee <ddoman@chromium.org>changes/52/6256552/6
parent
e803e2cb4b
commit
f945c74073
Loading…
Reference in New Issue