<HTML>
<HEAD>
<TITLE>Re: [vtk-developers] New git commit hooks</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>That doesn’t make any sense Berk. As it is, there already exists several hooks that restrict the commits that you can place, so the problem you describe can already happen as it is. This is why the advice is to install the hooks in your local repository.<BR>
<BR>
None of the current checks I found in these hooks are fatal or close to fatal. On checks to make sure that there is no whitespace at the end of a line. How is that close to fatal? Another makes sure that the first line of your commit message is 79 characters or less. Will my web browser die if it encounters an 80 character commit message?<BR>
<BR>
I consider tab removal more important than those other hooks. It’s also a lot easier to comply with than trailing whitespace.<BR>
<BR>
-Ken<BR>
<BR>
<BR>
On 4/23/10 6:07 AM, "Berk Geveci" <<a href="berk.geveci@kitware.com">berk.geveci@kitware.com</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>I am sure Brad will chime in but here is the reasoning behind not<BR>
having these hooks:<BR>
<BR>
Consider the case where you have a branch with 10 commits. Say the 2nd<BR>
one has a tab in it. When you try to push this, your whole push would<BR>
get rejected. Now you have to figure out how to fix the 2nd commt<BR>
while keeping all the commits after that the same. Note that you<BR>
cannot simply fix the problem by making a new commit or a revert<BR>
commit because the hook checks every single commit for problems. Of<BR>
course, fixing the 2nd commit is doable by rewriting history but it is<BR>
not the most straightforward thing to do.<BR>
<BR>
So we decided that commit checks would for fatal or close to fatal<BR>
problems and that the other problems would be caught on the dashboard<BR>
so that they can be fixed by later commits.<BR>
<BR>
(I disagree with the trailing space check btw. I think it is too<BR>
aggressive. There are many developers that use editors that are not<BR>
very good at not leaving trailing spaces. Forcing everyone to change<BR>
is to invasive)<BR>
<BR>
-berk<BR>
<BR>
<BR>
<BR>
On Fri, Apr 23, 2010 at 2:24 AM, Mark Olesen <<a href="Mark.Olesen@faurecia.com">Mark.Olesen@faurecia.com</a>> wrote:<BR>
> On Fri, 2010-04-23 at 10:34 +1000, Andrew Maclean wrote:<BR>
>> I agree with you, I think that there also should be a commit check<BR>
>> for tabs, otherwise layout gets really messy.<BR>
><BR>
> What about checking/stripping trailing whitespace as well?<BR>
> This is something else that tends to look messy and result in lots of<BR>
> noisy commits.<BR>
><BR>
> /mark<BR>
><BR>
><BR>
> DISCLAIMER:<BR>
> This electronic transmission (and any attachments thereto) is intended solely for the use of the addressee(s). It may contain confidential or legally privileged information. If you are not the intended recipient of this message, you must delete it immediately and notify the sender. Any unauthorized use or disclosure of this message is strictly prohibited. Faurecia does not guarantee the integrity of this transmission and shall therefore never be liable if the message is altered or falsified nor for any virus, interception or damage to your system.<BR>
><BR>
> _______________________________________________<BR>
> Powered by www.kitware.com<BR>
><BR>
> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><BR>
><BR>
> Follow this link to subscribe/unsubscribe:<BR>
> <a href="http://www.vtk.org/mailman/listinfo/vtk-developers">http://www.vtk.org/mailman/listinfo/vtk-developers</a><BR>
><BR>
><BR>
<BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT SIZE="1"><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:7.5pt'><BR>
**** Kenneth Moreland<BR>
*** Sandia National Laboratories<BR>
*********** <BR>
*** *** *** email: <a href="kmorel@sandia.gov">kmorel@sandia.gov</a><BR>
** *** ** phone: (505) 844-8919<BR>
*** web: <a href="http://www.cs.unm.edu/~kmorel">http://www.cs.unm.edu/~kmorel</a><BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT>
</BODY>
</HTML>