office-gobmx/.git-hooks
Miklos Vajna 2e4ecd03d6 clang-format: ignore not staged hunks
09:28 <@sberg> vmiklos, I think I ran into a scenario last night where I had
both `git add`-ed and non-added changes in a non-blacklisted file, and the
non-added changes violated clang-format (and the added ones did not), and the
commit hook complained

So make sure we validate the index version, not the filesystem one.

(And modify a formatted file to trigger CI validation of the hook change
itself.)

Change-Id: I6431b35ac50dd03741104b5709c5195d6ff28632
Reviewed-on: https://gerrit.libreoffice.org/46368
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-12-13 13:44:23 +01:00
..
commit-msg
post-merge git-hooks: post-merge script does not need /bin/bash 2015-02-13 16:40:36 +01:00
pre-commit clang-format: ignore not staged hunks 2017-12-13 13:44:23 +01:00
README git-hooks: Info how to install them manually. 2015-09-08 14:50:48 +02:00

Git hooks are executable scripts you can place in $GIT_DIR/hooks directory to trigger action at certain points.

To install manually, run:

  cd .git/hooks && ln -s ../../.git-hooks/* ./

There are two groups of these hooks: client side and server side.

The client-side hooks:
are for client operations such as committing and merging.

The server-side hooks:
are for Git server operations such as receiving pushed commits.

See Also [ http://git-scm.com/book/en/Customizing-Git-Git-Hooks ]