URGENT -- massive merge commit on macports/macports-ports

Rainer Müller raimue at macports.org
Wed May 22 20:49:04 UTC 2019

As a reference for everyone, we are talking about this commit in this

On 22.05.19 01:06, Christopher Jones wrote:
> Its a merge commit, i.e. the committer at some point pulled in changes to a branch which they subsequently pushed to master without rebasing.

Jann, I assume you just ran 'git pull' which created this merge commit.
The better option would have been to run 'git pull --rebase' to avoid
this merge and place your new commit on top of the existing
macports-ports master.

It is indeed a bit complicated and git does not make it easy to
understand it. Please see our documentation that we prefer the rebase

> Its ‘OK’ in that its not a real commit. The changes you see in GitHub won’t really happen (if you look in detail they are commits already in master).

I assume GitHub displays it like this because the merge is "reversed" to
their usual workflow. The previous macports-ports master is on the right
hand side of the merge. Therefore it looks like the macports-ports
master was merged into another branch.

As another example, it did not look that horrific in the notification on
macports-changes (HTML only):

> Avoiding these is why we rebase, i.e. if your setup is configure to work directly from a git checkout running ’sudo port sync’ under the hood runs ‘git pull —rebase —autostash origin master’ (if your git is new enough). 
> We don’t really want these commits in the master history, but at this point removing it (rewriting history in master) would be a bad idea and possibly lead to trouble, so best to leave it, and hope the committer learns not to do it again ;)
I agree, there is not much we can do against this without rewriting
history and force-pushing, which would break the next pull operation for
everyone. Also it did not even do any damage, it just looks strange on
the GitHub web interface.


More information about the macports-dev mailing list