-
Jamie Madill authored
Clients using some Clang-Format options can run into bugs when using 0 lines of context. AlignConsecutiveAssignments in particular is picky and behaves differently with 0 lines of context. This behaviour lead to 'git cl format' behaving differently from 'git cl format --full'. That could also break presubmit format checks. Using >0 lines of context for 'git diff' fixes the inconsistency. Add a setting 'DIFF_LINES_OF_CONTEXT' that can be controlled via codereview.settings. Defaults to zero to preserve the old behaviour. The setting allows the client to control the number of lines of context to use when running 'git cl format'. Bug: angleproject:4003 Change-Id: Ied2ebf23df4c41ba19bfbd5b8ddf526b56a20b31 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1864309Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
812ac228