[vtk-developers] Auto install git hooks

Brad King brad.king at kitware.com
Fri Jul 16 10:30:55 EDT 2010


On 07/05/2010 10:48 AM, Marcus D. Hanwell wrote:
> I pressed the button, and pushed this change into VTK master. I was
> going to check the dashboards and see what happens. I can push a very
> similar change into ParaView, but it just struck me that this has only
> been raised on the VTK developer list.
> 
> I tried to make the instructions as explicit as possible for users and
> developers. Please let me know if you see any problems.

I updated the approach so that the instructions only get printed
when a developer first tries to commit:

  http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=ce1b0901

-Brad

commit ce1b09015176ea1c4191b726211f6028dede26c4
Author: Brad King <brad.king at kitware.com>
Date:   Fri Jul 16 10:22:24 2010 -0400

    Delay Git hooks setup until first commit

    Install a small .git/hooks/pre-commit script in the source tree at CMake
    configuration time instead of telling the user to do it.  When the user
    first attempts to commit this bootstrapping hook will trigger and print
    instructions to install the real hooks.  This approach allows us to
    require local hooks for commit but not for those who just want to build.

 .gitattributes                 |    1 +
 CMake/pre-commit               |   11 +++++++++++
 CMake/vtkCheckSourceTree.cmake |   29 +++++++++++++----------------
 3 files changed, 25 insertions(+), 16 deletions(-)



More information about the vtk-developers mailing list