<div dir="ltr">Hi Jon,<div><br></div><div>Welcome to git (and VTK).  When the commit hook says "tab in indent," it is disallowing the commit because your code contains tab characters.  In other words, you tried to commit, but it refused.</div><div><br></div><div>The "no tabs" rule is part of the basic "no changes should be invisible" guideline for code revision control.  Let's say that you edited a file that was already in the repository, converted some of the 4-space indents to tab characters, and then pushed it back to the repository.  To you, the code would look exactly the same, that is, the changes would be invisible to you.  But the git revision log would show that a change had occurred.  Also, to other developers who had their editor set to a 2-space (or 8-space) tabstop, the code would look very different.</div><div><br></div><div>Your editor (assuming that it is a code editor and not a simple text editor) will have an option to convert tabs to spaces when you save the file.</div><div><br></div><div>"Traling whitespace" or extra spaces at the end of a line are also forbidden, because they are generally invisible to the person who is editing the code, but they show up in the git revision logs.  A good editor will either have an option to highlight this trailing whitespace so that you can remove it, or an option to automatically remove it when the the file is saved.</div><div><br></div><div>In summary: you'll have to adjust your editor settings so that it writes files that conform to the pre-commit hook.</div><div><br></div><div> - David</div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 11, 2017 at 9:12 PM, Jon Garner <span dir="ltr"><<a href="mailto:thehappydog84@gmail.com" target="_blank">thehappydog84@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><font face="arial, helvetica, sans-serif">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...</font><div><font face="arial, helvetica, sans-serif"><br></font><div><font face="arial, helvetica, sans-serif">1.) I've gone through the process laid out here <a href="https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/develop.md" target="_blank">https://gitlab.kitware.<wbr>com/vtk/vtk/blob/master/<wbr>Documentation/dev/git/develop.<wbr>md</a>.</font></div><div><span style="font-family:arial,helvetica,sans-serif">2.) I've created a local clone of VTK</span><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">3.) Everything checks out when I run <span style="background-color:transparent;color:inherit;font-size:inherit">./Utilities/<wbr>SetupForDevelopment.sh.  </span></font></div><div><font face="arial, helvetica, sans-serif">4.) I have forked VTk into my Namespace on gitlab</font></div><div><span style="font-family:arial,helvetica,sans-serif">5.) I've created a new topic/branch</span><br></div><div><font face="arial, helvetica, sans-serif">6.) I added my .cxx and my .h file into the appropriate folder (then add using $git add)</font></div><div><font face="arial, helvetica, sans-serif">7.) I also modify the CMakelists.txt file (I add it too)</font></div><div><font face="arial, helvetica, sans-serif">7.) when I run $git commit I get the following</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><div>Jon@Arnie MINGW64 ~/VTK (Implement_<wbr>vtkInteractorStyleDrawPolygonT<wbr>ype2)</div><div>$ git commit</div><div>pre-commit hook failure</div><div>-----------------------</div><div><br></div><div>Interaction/Style/<wbr>vtkInteractorStyleDrawPolygonT<wbr>ype2.cxx:66: trailing whitespace.</div><div>+</div><div>Interaction/Style/<wbr>vtkInteractorStyleDrawPolygonT<wbr>ype2.cxx:75: tab in indent.</div><div>+       //draw a circle at nodes</div><div>Interaction/Style/<wbr>vtkInteractorStyleDrawPolygonT<wbr>ype2.cxx:76: tab in indent.</div><div>+       for(int j = 1; j < 30; j += 1)</div><div>Interaction/Style/<wbr>vtkInteractorStyleDrawPolygonT<wbr>ype2.cxx:77: tab in indent.</div><div>+       {</div><div>Interaction/Style/<wbr>vtkInteractorStyleDrawPolygonT<wbr>ype2.cxx:78: tab in indent.</div><div>+               for (int dotRad = 0; dotRad <= 3; dotRad += 1)</div><div>Interaction/Style/<wbr>vtkInteractorStyleDrawPolygonT<wbr>ype2.cxx:79: tab in indent.</div></div><div>.</div><div>.</div><div>.</div><div><br></div><div>until it reaches the end of the .cxx and the .h file then it just ends no mention of the .txt file.</div><div><br></div><div>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.  </div><div><br></div><div>running $git status I get the following</div><div><br></div><div><div>Jon@Arnie MINGW64 ~/VTK (Implement_<wbr>vtkInteractorStyleDrawPolygonT<wbr>ype2)</div><div>$ git status</div><div>On branch Implement_<wbr>vtkInteractorStyleDrawPolygonT<wbr>ype2</div><div>Changes to be committed:</div><div>  (use "git reset HEAD <file>..." to unstage)</div><div><br></div><div>        new file:   Interaction/Style/<wbr>vtkInteractorStyleDrawPolygonT<wbr>ype2.cxx</div><div>        new file:   Interaction/Style/<wbr>vtkInteractorStyleDrawPolygonT<wbr>ype2.h</div><div><br></div><div>Changes not staged for commit:</div><div>  (use "git add <file>..." to update what will be committed)</div><div>  (use "git checkout -- <file>..." to discard changes in working directory)</div><div><br></div><div>        modified:   Interaction/Style/CMakeLists.<wbr>txt</div></div><div> .</div><div>.</div><div>.</div><div><br></div><div>running $git prepush it just returns no information is given.</div><div><br></div><div>The next thing I intend to do is restore the CMakelist.txt change and see if that fixes the problem.</div><div><br></div></div></div></blockquote></div></div></div></div>