<div dir="ltr">Thanks Mathieu</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 12, 2017 at 2:10 AM, Mathieu Westphal <span dir="ltr"><<a href="mailto:mathieu.westphal@kitware.com" target="_blank">mathieu.westphal@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi<br><br>Also, if i'm not mistaken, git diff should highlight trailing whitespaces, before your commit, allowing you to locate these problems easilly.<br><br></div>Regards,<br></div><div class="gmail_extra"><br clear="all"><div><div class="m_-9111841988237368093gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Mathieu Westphal<br></div></div></div>
<br><div class="gmail_quote"><div><div class="h5">On Thu, Jan 12, 2017 at 6:31 AM, Jon Garner <span dir="ltr"><<a href="mailto:thehappydog84@gmail.com" target="_blank">thehappydog84@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Ahhh... I should have emailed this last night, I don't think I would have figured that out. This is my first time doing really anything with any type of project (open source or otherwise), so thank you very much. </div><div class="m_-9111841988237368093HOEnZb"><div class="m_-9111841988237368093h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 12, 2017 at 12:16 AM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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><span class="m_-9111841988237368093m_7569144025040728343HOEnZb"><font color="#888888"><div><br></div><div> - David</div></font></span><div><div class="m_-9111841988237368093m_7569144025040728343h5"><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.co<wbr>m/vtk/vtk/blob/master/Document<wbr>ation/dev/git/develop.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/SetupForDevelo<wbr>pment.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_vtkInteractorStyleD<wbr>rawPolygonType2)</div><div>$ git commit</div><div>pre-commit hook failure</div><div>-----------------------</div><div><br></div><div>Interaction/Style/vtkInteracto<wbr>rStyleDrawPolygonType2.cxx:66: trailing whitespace.</div><div>+</div><div>Interaction/Style/vtkInteracto<wbr>rStyleDrawPolygonType2.cxx:75: tab in indent.</div><div>+ //draw a circle at nodes</div><div>Interaction/Style/vtkInteracto<wbr>rStyleDrawPolygonType2.cxx:76: tab in indent.</div><div>+ for(int j = 1; j < 30; j += 1)</div><div>Interaction/Style/vtkInteracto<wbr>rStyleDrawPolygonType2.cxx:77: tab in indent.</div><div>+ {</div><div>Interaction/Style/vtkInteracto<wbr>rStyleDrawPolygonType2.cxx:78: tab in indent.</div><div>+ for (int dotRad = 0; dotRad <= 3; dotRad += 1)</div><div>Interaction/Style/vtkInteracto<wbr>rStyleDrawPolygonType2.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_vtkInteractorStyleD<wbr>rawPolygonType2)</div><div>$ git status</div><div>On branch Implement_vtkInteractorStyleDr<wbr>awPolygonType2</div><div>Changes to be committed:</div><div> (use "git reset HEAD <file>..." to unstage)</div><div><br></div><div> new file: Interaction/Style/vtkInteracto<wbr>rStyleDrawPolygonType2.cxx</div><div> new file: Interaction/Style/vtkInteracto<wbr>rStyleDrawPolygonType2.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.t<wbr>xt</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></div></div>
</blockquote></div><br></div>
</div></div><br></div></div>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/vtk-developers</a><br>
<br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>