[vtk-developers] New to Gitlab - pre-commit hook failure when trying to commit new files

Jon Garner thehappydog84 at gmail.com
Wed Jan 11 23:12:09 EST 2017

So I'm new around here and I've written a new class that I'd like to get
onto Gitlab. (I'm also new to Git) If anyone could help me I'd greatly
appreciate it. Here goes...

1.) I've gone through the process laid out here
2.) I've created a local clone of VTK
3.) Everything checks out when I run ./Utilities/SetupForDevelopment.sh.
4.) I have forked VTk into my Namespace on gitlab
5.) I've created a new topic/branch
6.) I added my .cxx and my .h file into the appropriate folder (then add
using $git add)
7.) I also modify the CMakelists.txt file (I add it too)
7.) when I run $git commit I get the following

Jon at Arnie MINGW64 ~/VTK (Implement_vtkInteractorStyleDrawPolygonType2)
$ git commit
pre-commit hook failure

Interaction/Style/vtkInteractorStyleDrawPolygonType2.cxx:66: trailing
Interaction/Style/vtkInteractorStyleDrawPolygonType2.cxx:75: tab in indent.
+       //draw a circle at nodes
Interaction/Style/vtkInteractorStyleDrawPolygonType2.cxx:76: tab in indent.
+       for(int j = 1; j < 30; j += 1)
Interaction/Style/vtkInteractorStyleDrawPolygonType2.cxx:77: tab in indent.
+       {
Interaction/Style/vtkInteractorStyleDrawPolygonType2.cxx:78: tab in indent.
+               for (int dotRad = 0; dotRad <= 3; dotRad += 1)
Interaction/Style/vtkInteractorStyleDrawPolygonType2.cxx:79: tab in indent.

until it reaches the end of the .cxx and the .h file then it just ends no
mention of the .txt file.

I tried pushing it and it sends the branch but the new files aren't there.
I'm assuming it has something to do with the pre-commit hook failure.

running $git status I get the following

Jon at Arnie MINGW64 ~/VTK (Implement_vtkInteractorStyleDrawPolygonType2)
$ git status
On branch Implement_vtkInteractorStyleDrawPolygonType2
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        new file:   Interaction/Style/vtkInteractorStyleDrawPolygonType2.cxx
        new file:   Interaction/Style/vtkInteractorStyleDrawPolygonType2.h

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   Interaction/Style/CMakeLists.txt

running $git prepush it just returns no information is given.

The next thing I intend to do is restore the CMakelist.txt change and see
if that fixes the problem.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20170111/ef3f9cf1/attachment.html>

More information about the vtk-developers mailing list