Some points on clang-format usage

Stephan Bergmann sbergman at redhat.com
Tue Mar 6 09:25:12 UTC 2018


On 17.11.2017 10:03, Stephan Bergmann wrote:
> * Don't reformat when moving an existing file
> 
> When moving an old file that is listed in solenv/clang-format/blacklist 
> (so doesn't automatically get reformatted upon commit), adapt 
> solenv/clang-format/blacklist to contain the new name, instead of 
> provoking a reformat upon commit.  Otherwise, if the reformatted code 
> looks sufficiently different from the original, it's hard to impossible 
> to keep track in the git history of which file was moved where.

Please also follow this advice when moving part of an existing file out 
to a new file, as happened e.g. at 
<https://cgit.freedesktop.org/libreoffice/core/commit/?id=bdd62b4c327ab894dbba00fe2e07696c1b7d9de6> 
"vcl: split painting bitmap functions to bitmappaint.cxx".


More information about the LibreOffice mailing list