Please avoid noisy merge commits in frameworks

Ben Cooksley bcooksley at kde.org
Sun Feb 19 20:43:00 GMT 2012


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.

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.

>
> Thanks,
>
> Steve.
>
>

Regards,
Ben Cooksley
KDE Sysadmin.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20120220/42fb43e7/attachment.htm>


More information about the kde-core-devel mailing list