Script for running uncrustify for modified files.
authorTeemu Murtola <teemu.murtola@gmail.com>
Wed, 13 Feb 2013 11:51:07 +0000 (13:51 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Sun, 30 Jun 2013 22:50:59 +0000 (00:50 +0200)
commit9f0d8f20a3996791dc9b0983d36846f6d1bc6c5c
treed5b5a75692a9cc24a5449f6283ee97768ebdb783
parent8f7c2af6b66835632ba1f127b9725c62755d6ace
Script for running uncrustify for modified files.

Comments in the script explain how to use it manually or automatically.
The script uses the git filter attribute to indentify which files to run
uncrustify for.  This makes it possible to configure a git filter for
running uncrustify instead of using the script.  This is also described
in the script comments.

The script is easily extensible to do other types of automatic
reformatting, e.g., to check/add copyright headers.

Also contains a pre-commit hook for running uncrustify.  Currently only
checks the formatting; does not yet automatically reformat anything, as
it is a bit unclear what is the best way to do that.

Related to #845.

Change-Id: I389f2ebf43182d4827d1ec10cb6c1332bd4bf8de
.gitattributes [new file with mode: 0644]
admin/git-pre-commit [new file with mode: 0755]
admin/uncrustify.sh [new file with mode: 0755]
src/external/.gitattributes [new file with mode: 0644]