[vtk-developers] New git commit hooks
bill.lorensen at gmail.com
Fri Apr 23 12:28:56 EDT 2010
Would it be possible to have hook checks for tabs, etc. in a users
local repository? That way the code would be clean before the push
into a master.
On Fri, Apr 23, 2010 at 8:07 AM, Berk Geveci <berk.geveci at kitware.com> wrote:
> I am sure Brad will chime in but here is the reasoning behind not
> having these hooks:
> Consider the case where you have a branch with 10 commits. Say the 2nd
> one has a tab in it. When you try to push this, your whole push would
> get rejected. Now you have to figure out how to fix the 2nd commt
> while keeping all the commits after that the same. Note that you
> cannot simply fix the problem by making a new commit or a revert
> commit because the hook checks every single commit for problems. Of
> course, fixing the 2nd commit is doable by rewriting history but it is
> not the most straightforward thing to do.
> So we decided that commit checks would for fatal or close to fatal
> problems and that the other problems would be caught on the dashboard
> so that they can be fixed by later commits.
> (I disagree with the trailing space check btw. I think it is too
> aggressive. There are many developers that use editors that are not
> very good at not leaving trailing spaces. Forcing everyone to change
> is to invasive)
> On Fri, Apr 23, 2010 at 2:24 AM, Mark Olesen <Mark.Olesen at faurecia.com> wrote:
>> On Fri, 2010-04-23 at 10:34 +1000, Andrew Maclean wrote:
>>> I agree with you, I think that there also should be a commit check
>>> for tabs, otherwise layout gets really messy.
>> What about checking/stripping trailing whitespace as well?
>> This is something else that tends to look messy and result in lots of
>> noisy commits.
>> 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.
>> Powered by www.kitware.com
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>> Follow this link to subscribe/unsubscribe:
> Powered by www.kitware.com
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> Follow this link to subscribe/unsubscribe:
More information about the vtk-developers