Please avoid noisy merge commits in frameworks

Stephen Kelly steveire at gmail.com
Sun Feb 19 20:46:31 GMT 2012


Ben Cooksley wrote:

> On Feb 20, 2012 7:12 AM, "Stephen Kelly" <steveire at gmail.com> wrote:
>>
>> Dario Freddi wrote:
>>
>> > 2012/2/19 Stephen Kelly <steveire at gmail.com>:
>> >> Stephen Kelly wrote:
>> >>
>> >>>
>> >>> Hi there,
>> >>>
>> >>> I was reviewing the changes in the frameworks branch from yesterday.
>> >>> Something I noticed was that there are a lot of merge commits that
> don't
>> >>> need to exist.
>> >>
>> >> Ugh. Yet more of this just appeared... Recent history in the
>> >> frameworks branch looks far more complex than it is and is harder to
>> >> follow.
>> >>
>> >> There are too many people unaware that they're doing it maybe...
>> >
>> > What about having a small volunteer day in which we draft some
>> > policies for git commits and eventually implement some hooks to avoid
>> > these (and other) things happening?
>> >
>>
>> There's some ideas for such hooks on the Internet already:
>>
>> http://stackoverflow.com/questions/2039773/have-remote-git-repository-
>> refuse-merge-commits-on-push
>>
>> I don't know ruby or shell scripting well enough to write something
> sysadmin
>> would accept, but I would definitely welcome such a hook.
> 
> First, our hooks are in python - so any changes would need to be in Python
> as well.
> 
> Second, there is a legitimate use for pushing merge commits - namely
> integrating a seperate remote branch. I have no idea if it would be
> possible to determine if this is a local only branch merge or not.

According to the question, it should be possible : '... The only exception 
being if the merge is between branches that exist in the central repository 
...'

> 
> Third, please ensure that you disable the previously mentioned auto-rebase
> on git pull if you are merging a reemote branch, otherwise you will
> duplicate many commits, in addition to triggering the hooks for all those
> commits (which will not happen if you just merge). The hooks could even
> decide to reject your push, as it will contain too many new commits.

In short, if you want to merge, make sure you know what you're doing, and 
check the result in gitk (and make sure you understand what you see) before 
pushing :).


> 
> Regards,
> Ben Cooksley
> KDE Sysadmin.






More information about the kde-core-devel mailing list