To force-push or not to force-push

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

To force-push or not to force-push

Mojca Miklavec-2
Hi,

A confused maintainer just pointed out "a problem" with our guidelines:
     https://trac.macports.org/wiki/CommitMessages#corrections

~~~
You cannot correct commits that you have already pushed. Comment on
the commit's GitHub page instead. (Modifying your local history causes
it to diverge from the public history. Publishing this alternate
history would require force-pushing, which we disallow because it's
bad practice.)
~~~

However this does NOT hold for pull requests and we really need to clarify this.

https://github.com/macports/macports-ports/pull/421#issuecomment-294312952

Mojca
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: To force-push or not to force-push

Rainer Müller-4
On 2017-04-15 21:30, Mojca Miklavec wrote:

> Hi,
>
> A confused maintainer just pointed out "a problem" with our guidelines:
>      https://trac.macports.org/wiki/CommitMessages#corrections
>
> ~~~
> You cannot correct commits that you have already pushed. Comment on
> the commit's GitHub page instead. (Modifying your local history causes
> it to diverge from the public history. Publishing this alternate
> history would require force-pushing, which we disallow because it's
> bad practice.)
> ~~~
>
> However this does NOT hold for pull requests and we really need to clarify this.
>
> https://github.com/macports/macports-ports/pull/421#issuecomment-294312952

For pull requests, you are not pushing to the MacPorts repository, but
to the repository of the user who opened the pull request...

It seems like it would be easier to correct these kind of things if we
allowed squashing commits in the GitHub UI when accepting a pull
request, instead of only allowing rebase.

Rainer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: To force-push or not to force-push

Helmut K. C. Tessarek
On 2017-04-19 08:43, Rainer Müller wrote:

> For pull requests, you are not pushing to the MacPorts repository,
> but to the repository of the user who opened the pull request...

Yes, but the documentation is not clear about this. It does not say that
the project is ok with force-pushing in PRs. Some projects are not ok
with it and require you to close the PR and open a new one (or to add
commits to change previous ones).

> It seems like it would be easier to correct these kind of things if
> we allowed squashing commits in the GitHub UI when accepting a pull
> request, instead of only allowing rebase.

Yep, but it's also more error prone. You could easily squash commits
which are not supposed to be squashed.

Cheers,
  K. C.

--
regards Helmut K. C. Tessarek
lookup http://pool.sks-keyservers.net for KeyID 0xC11F128D

/*
   Thou shalt not follow the NULL pointer for chaos and madness
   await thee at its end.
*/
Loading...