From 07408e687ce440bf665cd6d04d65075b20db0215 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Sat, 25 Feb 2012 19:52:45 +0100 Subject: gitconfig: Add lint-stable as pre-commit hook When configuring the tree with "make gitconfig", a pre-commit hook is installed that runs the stable lint tests. If any of these fail, the log is visible (on stdout) and the commit is aborted. Change-Id: Ie2a26e87f466c63b24db8dca8827057a18ac7f3e Signed-off-by: Patrick Georgi Reviewed-on: http://review.coreboot.org/682 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- Makefile.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile.inc') diff --git a/Makefile.inc b/Makefile.inc index 0f040e91b5..2f61a45b81 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -239,7 +239,7 @@ lint lint-stable: rm -f $$LINTLOG gitconfig: - if ! [ -x .git/hooks/commit-msg ]; then cp util/gitconfig/commit-msg .git/hooks/commit-msg; chmod +x .git/hooks/commit-msg; fi + for hook in commit-msg pre-commit; do if ! [ -x .git/hooks/$$hook ]; then cp util/gitconfig/$$hook .git/hooks/$$hook; chmod +x .git/hooks/$$hook; fi; done (git config --global user.name >/dev/null && git config --global user.email >/dev/null) || (printf 'Please configure your name and email in git:\n\n git config --global user.name "Your Name Comes Here"\n git config --global user.email your.email@example.com\n'; exit 1) crossgcc: clean-for-update -- cgit v1.2.3