You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Eirik Bakke <eb...@ultorg.com> on 2020/10/09 16:26:09 UTC

RE: Merging on github (aka Squash and Merge is broken)

What's the status on "Squash and merge"?

I'd like to merge the PR at https://github.com/apache/netbeans/pull/2410 , but I can't remember how to verify that "Squash and merge" won't put in bogus author information.

-- Eirik

-----Original Message-----
From: Neil C Smith <ne...@apache.org> 
Sent: Sunday, August 9, 2020 8:43 AM
To: dev <de...@netbeans.apache.org>
Subject: Re: Merging on github (aka Squash and Merge is broken)

On Thu, 12 Dec 2019 at 20:41, Matthias Bläsing <mb...@doppel-helix.eu> wrote:
> 14. Switch back to master
>
>    git checkout master
>
> 15. Merge (commit hash from above):
>
>    git merge c20b63503c98
>
> 16. Push
>
>    git push
>
>
> Do this multiple times with test sets, then its _very_ easy. The 
> alternative is of course to ask the author to do the squash himself, 
> he can update the PR (requires a forced push)

Just following up on this.  I've had a few of these come up during
12.1 so far.  I'm also not entirely a fan of bypassing the PR system or direct pushes to upstream master (I have push-url set to disabled by default).

As well as the author squashing the PR, it is also possible for any committer to force push the PR branch (by default anyway) if the author cannot for some reason.  I did this with eg.
https://github.com/apache/netbeans/pull/2023  And I think all is fine with the git history on this.

Matthias, could you have a quick check on that?  I used your instructions roughly up to where to push to.  But this has the benefit of linking back to original PR / closing, allowing the author to check over, and running CI tests again before merging.  Thoughts on pros / cons of updating instructions to recommend this?

Thanks and best wishes,

Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




RE: Merging on github (aka Squash and Merge is broken)

Posted by Eirik Bakke <eb...@ultorg.com>.
Thank you... will ask the PR author to do this and then do "Squash and Merge", and verify that it ends up correct.

-- Eirik

-----Original Message-----
From: Matthias Bläsing <mb...@doppel-helix.eu> 
Sent: Friday, October 9, 2020 1:09 PM
To: dev@netbeans.apache.org
Subject: Re: Merging on github (aka Squash and Merge is broken)

Am Freitag, den 09.10.2020, 17:06 +0000 schrieb Eirik Bakke:
> > 1. Ask the author to update his author information and squash the 
> > commits and force push the updated commit
> 
> If the author puts his proper email on his Github profile, will the 
> "Squash and Merge" button work? Or will he still have to do the manual 
> squash and force push?

The crucial point in the past was, that the email had to be selected as "Public email" in the "Profile" section of the settings.

Matthias


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Merging on github (aka Squash and Merge is broken)

Posted by Matthias Bläsing <mb...@doppel-helix.eu>.
Am Freitag, den 09.10.2020, 17:06 +0000 schrieb Eirik Bakke:
> > 1. Ask the author to update his author information and squash the
> > commits and force push the updated commit
> 
> If the author puts his proper email on his Github profile, will the
> "Squash and Merge" button work? Or will he still have to do the
> manual squash and force push?

The crucial point in the past was, that the email had to be selected as
"Public email" in the "Profile" section of the settings.

Matthias


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




RE: Merging on github (aka Squash and Merge is broken)

Posted by Eirik Bakke <eb...@ultorg.com>.
> 1. Ask the author to update his author information and squash the commits and force push the updated commit

If the author puts his proper email on his Github profile, will the "Squash and Merge" button work? Or will he still have to do the manual squash and force push?

-- Eirik

-----Original Message-----
From: Matthias Bläsing <mb...@doppel-helix.eu> 
Sent: Friday, October 9, 2020 1:01 PM
To: dev@netbeans.apache.org
Subject: Re: Merging on github (aka Squash and Merge is broken)

Hi Eirik,

actually not sure if github improved, but I looked at the profile of the author:

https://github.com/MKuettner

and there is a real name (great), but no email address. Looking at the commits (locally), I see a valid email address, but the real name part is not complete.

I see two options:

1. Ask the author to update his author information and squash the commits and force push the updated commit 2. Do it yourself locally and update the author information

From a "good for future" perspective, I would prefer (1).

HTH

Matthias

Am Freitag, den 09.10.2020, 16:26 +0000 schrieb Eirik Bakke:
> What's the status on "Squash and merge"?
> 
> I'd like to merge the PR at
> https://github.com/apache/netbeans/pull/2410 , but I can't remember 
> how to verify that "Squash and merge" won't put in bogus author 
> information.
> 
> -- Eirik
> 
> -----Original Message-----
> From: Neil C Smith <ne...@apache.org>
> Sent: Sunday, August 9, 2020 8:43 AM
> To: dev <de...@netbeans.apache.org>
> Subject: Re: Merging on github (aka Squash and Merge is broken)
> 
> On Thu, 12 Dec 2019 at 20:41, Matthias Bläsing < 
> mblaesing@doppel-helix.eu> wrote:
> > 14. Switch back to master
> > 
> >    git checkout master
> > 
> > 15. Merge (commit hash from above):
> > 
> >    git merge c20b63503c98
> > 
> > 16. Push
> > 
> >    git push
> > 
> > 
> > Do this multiple times with test sets, then its _very_ easy. The 
> > alternative is of course to ask the author to do the squash himself, 
> > he can update the PR (requires a forced push)
> 
> Just following up on this.  I've had a few of these come up during
> 12.1 so far.  I'm also not entirely a fan of bypassing the PR system 
> or direct pushes to upstream master (I have push-url set to disabled 
> by default).
> 
> As well as the author squashing the PR, it is also possible for any 
> committer to force push the PR branch (by default anyway) if the 
> author cannot for some reason.  I did this with eg.
> https://github.com/apache/netbeans/pull/2023  And I think all is fine 
> with the git history on this.
> 
> Matthias, could you have a quick check on that?  I used your 
> instructions roughly up to where to push to.  But this has the benefit 
> of linking back to original PR / closing, allowing the author to check 
> over, and running CI tests again before merging.  Thoughts on pros / 
> cons of updating instructions to recommend this?
> 
> Thanks and best wishes,
> 
> Neil
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@netbeans.apache.org
> 
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@netbeans.apache.org
> 
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Merging on github (aka Squash and Merge is broken)

Posted by Neil C Smith <ne...@apache.org>.
On Sat, 10 Oct 2020, 18:32 Laszlo Kishalmi, <la...@gmail.com>
wrote:

> Now what would be the best option? Remove the top of master by force
> (not a really nice thing to do) or create a revert PR? Well the first
> would resolve the issue commit with the wrong email in the repo, the
> later one would be just a corrective one.
>

Last time this was discussed I suggested we look at adding a .mailmap file?
Think some other ASF projects are doing this for same purpose.

It's potentially the easiest option if force pushing to the PR is a problem
for some people (although I found Matthias' instructions on the wiki very
useful, apart from changing the target branch)

Neil

RE: Merging on github (aka Squash and Merge is broken)

Posted by Eirik Bakke <eb...@ultorg.com>.
> The crucial point in the past was, that the email had to be selected as "Public email" in the "Profile" section of the settings.

I just used the "Squash and Merge" feature to merge https://github.com/apache/netbeans/pull/2410 , and can confirm that the author information that ended up in the NetBeans git repository is the full name (not GitHub username) and email address which is listed on the PR author's public github profile.

So as long as these two pieces of information show up correctly on the PR author's public github profile, it seems safe to use the "Squash and Merge" feature.

(And if erroneous info has already been committed, I agree with Mathias' point about using "git revert" rather than force push to master.)

-- Eirik

-----Original Message-----
From: Matthias Bläsing <mb...@doppel-helix.eu> 
Sent: Sunday, October 11, 2020 3:09 PM
To: dev@netbeans.apache.org
Subject: Re: Merging on github (aka Squash and Merge is broken)

Hi,

Am Samstag, den 10.10.2020, 10:32 -0700 schrieb Laszlo Kishalmi:
> It seems it is still an issue on github squash and merge. Just did a 
> merge. I've checked the email on the individual commits which seemed 
> to be right and valid, then ended up in the master as
> 72509841+adrienDG@users.noreply.github.com
> https://github.com/apache/netbeans/commit/7990cee5aa9d8460b563d7ad44d7
> 43843c6c064a
> 
> Now what would be the best option? Remove the top of master by force 
> (not a really nice thing to do) or create a revert PR? Well the first 
> would resolve the issue commit with the wrong email in the repo, the 
> later one would be just a corrective one.
> 

we can't force push into master. That would be a problem for all users already on latest master, as their repository state becomes invalid.
I'm also not sure how the github <-> asf sync infrastructure would take it. We should have very good reasons to change history for a public branch, which I would only see for security issues.

I suggest to revert the commit with the normal git mechanic (revert commit references reverted commit, possible adding a reasoning). After that a cleaned version can be applied.

HTH

Matthias


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Merging on github (aka Squash and Merge is broken)

Posted by Matthias Bläsing <mb...@doppel-helix.eu>.
Hi,

Am Samstag, den 10.10.2020, 10:32 -0700 schrieb Laszlo Kishalmi:
> It seems it is still an issue on github squash and merge. Just did a 
> merge. I've checked the email on the individual commits which seemed to 
> be right and valid, then ended up in the master as 
> 72509841+adrienDG@users.noreply.github.com 
> https://github.com/apache/netbeans/commit/7990cee5aa9d8460b563d7ad44d743843c6c064a
> 
> Now what would be the best option? Remove the top of master by force 
> (not a really nice thing to do) or create a revert PR? Well the first 
> would resolve the issue commit with the wrong email in the repo, the 
> later one would be just a corrective one.
> 

we can't force push into master. That would be a problem for all users
already on latest master, as their repository state becomes invalid.
I'm also not sure how the github <-> asf sync infrastructure would take
it. We should have very good reasons to change history for a public
branch, which I would only see for security issues.

I suggest to revert the commit with the normal git mechanic (revert
commit references reverted commit, possible adding a reasoning). After
that a cleaned version can be applied.

HTH

Matthias


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Merging on github (aka Squash and Merge is broken)

Posted by Laszlo Kishalmi <la...@gmail.com>.
It seems it is still an issue on github squash and merge. Just did a 
merge. I've checked the email on the individual commits which seemed to 
be right and valid, then ended up in the master as 
72509841+adrienDG@users.noreply.github.com 
https://github.com/apache/netbeans/commit/7990cee5aa9d8460b563d7ad44d743843c6c064a

Now what would be the best option? Remove the top of master by force 
(not a really nice thing to do) or create a revert PR? Well the first 
would resolve the issue commit with the wrong email in the repo, the 
later one would be just a corrective one.

On 10/10/20 10:15 AM, Eirik Bakke wrote:
> In my case I'm using git on Windows with WSL, which unfortunately is very slow when working with the NetBeans repository. Stashing my own changes, switching branches, rebasing to squash etc. turns merging someone else's PR into a 30-minute operation. It's a lot easier, for me at least as a reviewer, if the original PR author configures their github with the right info so that "Squash and Merge" will just work correctly.
>
> -- Eirik
>
>
> -----Original Message-----
> From: Neil C Smith <ne...@apache.org>
> Sent: Friday, October 9, 2020 1:37 PM
> To: dev <de...@netbeans.apache.org>
> Subject: Re: Merging on github (aka Squash and Merge is broken)
>
> On Fri, 9 Oct 2020 at 18:00, Matthias Bläsing <mb...@doppel-helix.eu> wrote:
>> 1. Ask the author to update his author information and squash the
>> commits and force push the updated commit 2. Do it yourself locally
>> and update the author information
>>
>>  From a "good for future" perspective, I would prefer (1).
> A reminder from email above that if doing (2) you can force push to the author's PR branch, which any committer can do by default, then get the author to check if necessary, and merge as normal.
>
> That way we don't bypass PR statuses, etc.
>
> Best wishes,
>
> Neil
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




RE: Merging on github (aka Squash and Merge is broken)

Posted by Eirik Bakke <eb...@ultorg.com>.
In my case I'm using git on Windows with WSL, which unfortunately is very slow when working with the NetBeans repository. Stashing my own changes, switching branches, rebasing to squash etc. turns merging someone else's PR into a 30-minute operation. It's a lot easier, for me at least as a reviewer, if the original PR author configures their github with the right info so that "Squash and Merge" will just work correctly.

-- Eirik


-----Original Message-----
From: Neil C Smith <ne...@apache.org> 
Sent: Friday, October 9, 2020 1:37 PM
To: dev <de...@netbeans.apache.org>
Subject: Re: Merging on github (aka Squash and Merge is broken)

On Fri, 9 Oct 2020 at 18:00, Matthias Bläsing <mb...@doppel-helix.eu> wrote:
> 1. Ask the author to update his author information and squash the 
> commits and force push the updated commit 2. Do it yourself locally 
> and update the author information
>
> From a "good for future" perspective, I would prefer (1).

A reminder from email above that if doing (2) you can force push to the author's PR branch, which any committer can do by default, then get the author to check if necessary, and merge as normal.

That way we don't bypass PR statuses, etc.

Best wishes,

Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Merging on github (aka Squash and Merge is broken)

Posted by Neil C Smith <ne...@apache.org>.
On Fri, 9 Oct 2020 at 18:00, Matthias Bläsing <mb...@doppel-helix.eu> wrote:
> 1. Ask the author to update his author information and squash the
> commits and force push the updated commit
> 2. Do it yourself locally and update the author information
>
> From a "good for future" perspective, I would prefer (1).

A reminder from email above that if doing (2) you can force push to
the author's PR branch, which any committer can do by default, then
get the author to check if necessary, and merge as normal.

That way we don't bypass PR statuses, etc.

Best wishes,

Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Merging on github (aka Squash and Merge is broken)

Posted by Matthias Bläsing <mb...@doppel-helix.eu>.
Hi Eirik,

actually not sure if github improved, but I looked at the profile of
the author:

https://github.com/MKuettner

and there is a real name (great), but no email address. Looking at the
commits (locally), I see a valid email address, but the real name part
is not complete.

I see two options:

1. Ask the author to update his author information and squash the
commits and force push the updated commit
2. Do it yourself locally and update the author information

From a "good for future" perspective, I would prefer (1).

HTH

Matthias

Am Freitag, den 09.10.2020, 16:26 +0000 schrieb Eirik Bakke:
> What's the status on "Squash and merge"?
> 
> I'd like to merge the PR at 
> https://github.com/apache/netbeans/pull/2410 , but I can't remember
> how to verify that "Squash and merge" won't put in bogus author
> information.
> 
> -- Eirik
> 
> -----Original Message-----
> From: Neil C Smith <ne...@apache.org> 
> Sent: Sunday, August 9, 2020 8:43 AM
> To: dev <de...@netbeans.apache.org>
> Subject: Re: Merging on github (aka Squash and Merge is broken)
> 
> On Thu, 12 Dec 2019 at 20:41, Matthias Bläsing <
> mblaesing@doppel-helix.eu> wrote:
> > 14. Switch back to master
> > 
> >    git checkout master
> > 
> > 15. Merge (commit hash from above):
> > 
> >    git merge c20b63503c98
> > 
> > 16. Push
> > 
> >    git push
> > 
> > 
> > Do this multiple times with test sets, then its _very_ easy. The 
> > alternative is of course to ask the author to do the squash
> > himself, 
> > he can update the PR (requires a forced push)
> 
> Just following up on this.  I've had a few of these come up during
> 12.1 so far.  I'm also not entirely a fan of bypassing the PR system
> or direct pushes to upstream master (I have push-url set to disabled
> by default).
> 
> As well as the author squashing the PR, it is also possible for any
> committer to force push the PR branch (by default anyway) if the
> author cannot for some reason.  I did this with eg.
> https://github.com/apache/netbeans/pull/2023  And I think all is fine
> with the git history on this.
> 
> Matthias, could you have a quick check on that?  I used your
> instructions roughly up to where to push to.  But this has the
> benefit of linking back to original PR / closing, allowing the author
> to check over, and running CI tests again before merging.  Thoughts
> on pros / cons of updating instructions to recommend this?
> 
> Thanks and best wishes,
> 
> Neil
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@netbeans.apache.org
> 
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@netbeans.apache.org
> 
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists