Some brief notes regarding the code reindent.

Pull request: https://github.com/bitlbee/bitlbee/pull/14

Why

It's not my fault don't look at me like that.

How

The commands used were the following:

find . -name '*.[hc]' > filelist
uncrustify -c uncrustify.cfg --replace --no-backup -F filelist

uncrustify is http://uncrustify.sourceforge.net/

The configuration file (uncrustify.cfg) was added to the doc/ directory of the repository one commit before the reindent itself. It only includes the differences with the default config of uncrustify 0.60.

Adapting out of tree patches

To minimize the pain when adapting your patches to the new code style, follow these instructions

Given reindent as the indent commit (the one pointed by the bitlbee/reindent branch) and reindent^ as the previous one (the one which adds the uncrustify configuration file)

  1. Apply patches against reindent^, fix merge conflicts normally as needed, if any.

  2. Run the uncrustify command from above.
  3. Stage all the changes: git add -u

  4. Create a temporary commit: git commit -m "reindent temp commit"

  5. Merge with -X ours against the indent commit: git merge reindent -X ours

  6. Review resulting diff
  7. Squash or make a new patch with git diff reindent

BitlBee Wiki: Reindent (last edited 2015-03-28 01:21:44 by dx)