From 147839e23d49551ba61319b0812a3ef7e36cc80a Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Wed, 3 Oct 2012 16:18:54 -0600 Subject: [PATCH] LU-2083 build: install git commit hooks automatically Install the Lustre Git commit hooks into .git/hooks/ by default when autogen.sh is run, so that they are present when patches are being committed. This avoids the relatively common case where a new tree is checked out by new or experienced developers and is missing the commit hooks when patches are being submitted. While the commit hooks are sure to be installed for in any tree that was built, this isn't a guarantee that the hooks will be installed in every tree that has a commit, but it is very likely to be the case. Signed-off-by: Andreas Dilger Change-Id: I6a15420fb7a35b790c1e816c67e20a8004500c1e Reviewed-on: http://review.whamcloud.com/4175 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Yu Jian Reviewed-by: Wei Liu Reviewed-by: Bruce Korb Reviewed-by: Oleg Drokin --- autogen.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/autogen.sh b/autogen.sh index a32c3f8..1fce0a4 100644 --- a/autogen.sh +++ b/autogen.sh @@ -1,2 +1,9 @@ #!/bin/sh + +# install Lustre Git commit hooks by default - LU-2083 +for HOOK in commit-msg prepare-commit-msg; do + [ -e .git/hooks/$HOOK ] || ln -sf ../build/$HOOK .git/hooks/ +done + exec bash build/autogen.sh $@ + -- 1.8.3.1