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

2019-05-24 Thread Chris Jones




If that is indeed the case (although it would seem strange to me to not have 
such a commonly used feature), then we should recommend not using it, certainly 
for MacPorts related work.


I use the GitHub Desktop app. It is nice to have a graphical display of 
differences and to be able to select which ones to commit. Do you have a 
suggestion for something I should use instead?


Me, no. You are asking the wrong person, as I favour the command line 
client ;)


Maybe you could configure git to always do a rebase when pulling into 
your macports checkout See for instance




so for instance

> git config --global pull.rebase true

will configure things to always 'pull --rebase' for all your local 
clones. If you don't want it globally, remove the --global and do it 
locally for each project.


Note, if you do this, you also might want to enable at the same time 
automatic 'autostashing'




with the above, you could make it so

> git pull

effectively does

> git pull --rebase --autostash

which is what 'sudo port sync' does anyway under the hood (this is 
actually how I update my local repo most of the time).


( I have no idea though if any GUI you might use will respect any of 
this... If they just run 'git' under the hood it should, but ... )


Chris


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

2019-05-24 Thread Ryan Schmidt



On May 23, 2019, at 03:13, Chris Jones wrote:

> On 22/05/2019 10:41 pm, Jann Röder wrote:
>> On 22/05/2019 at 22:37 Joshua Root wrote:
>>> 
>>> Discussion on IRC indicates it was done from the GitHub web UI.
>>> 
>> The github app. I don't think you can even rebase in that.
> 
> If that is indeed the case (although it would seem strange to me to not have 
> such a commonly used feature), then we should recommend not using it, 
> certainly for MacPorts related work.

I use the GitHub Desktop app. It is nice to have a graphical display of 
differences and to be able to select which ones to commit. Do you have a 
suggestion for something I should use instead?

I believe I have run into this same problem once before. I believe I had 
committed a change to master locally and I wanted to push it, so I clicked the 
button that is usually "push", but I had not realized that GitHub Desktop had 
changed the "push" button to a "fetch" or maybe "pull" button because it had 
detected that there were upstream changes. Unbeknownst to me, pressing this 
button caused a merge to happen. Since it simply appeared to me as though 
pressing the button had not done anything, I pressed the "push" button again, 
which then published my unintended merge.

For myself, whenever I use git, I have worked around the problem by not working 
on master whenever possible, for repositories where I expect others to be 
pushing changes to master. For simple changes I want to make directly to 
master, I avoid using git, and instead use the GitHub Subversion bridge to 
commit my changes, since I have a better understanding of how Subversion works; 
for more complicated changes, I make a new git branch and publish it and create 
a pull request so that I can confirm the changes on the GitHub web interface 
before merging the PR.

~

Something else: the massive merge commit did schedule buildbot builds for every 
port in the merge. So that's another reason to try to avoid merge commits. We 
don't want to schedule builds for ports that don't need to be built.



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

2019-05-22 Thread Christopher Chavez




On 5/22/2019 4:37 PM, Joshua Root wrote:

Discussion on IRC indicates it was done from the GitHub web UI.


My impression is they were using GitHub desktop
(https://desktop.github.com/).


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

2019-05-22 Thread Jann Röder
On 22/05/2019 at 22:37 Joshua Root wrote:
>
> Discussion on IRC indicates it was done from the GitHub web UI.
>

The github app. I don't think you can even rebase in that.

-- 
Jann Röder 
PGP key ID: 0x7698DB91


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

2019-05-22 Thread Joshua Root
On 2019-5-23 06:49 , Rainer Müller wrote:
> As a reference for everyone, we are talking about this commit in this
> thread:
> https://github.com/macports/macports-ports/commit/8636b39946229023fecc2c8c5d99be1b0a0bccd1
> 
> 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.

Discussion on IRC indicates it was done from the GitHub web UI.

- Josh


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

2019-05-22 Thread Rainer Müller
As a reference for everyone, we are talking about this commit in this
thread:
https://github.com/macports/macports-ports/commit/8636b39946229023fecc2c8c5d99be1b0a0bccd1

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
operation:
https://trac.macports.org/wiki/WorkingWithGit#updating

> 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):
https://lists.macports.org/pipermail/macports-changes/2019-May/179654.html

> 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.

Rainer


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

2019-05-21 Thread Ken Cunningham
Thanks for checking. My git-fu was not sufficient to make sure we didn't wind 
up somewhere we didn't belong with this.

Ken


On 2019-05-21, at 4:06 PM, Christopher Jones wrote:

> 
> Hi,
> 
> 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. 
> 
> 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).
> 
> 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 ;)
> 
> Chris
> 
>> On 21 May 2019, at 10:44 pm, Ken Cunningham 
>>  wrote:
>> 
>> uh oh.
>> 
>> Somebody better take quick peek that this last commit, please.
>> 
>> Best,
>> 
>> Ken
> 



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

2019-05-21 Thread Christopher Jones

Hi,

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. 

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).

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 ;)

Chris

> On 21 May 2019, at 10:44 pm, Ken Cunningham  
> wrote:
> 
> uh oh.
> 
> Somebody better take quick peek that this last commit, please.
> 
> Best,
> 
> Ken



smime.p7s
Description: S/MIME cryptographic signature


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

2019-05-21 Thread Ken Cunningham
uh oh.

Somebody better take quick peek that this last commit, please.

Best,

Ken