Proposal: switch to squash merge strategy #3811
Replies: 4 comments 4 replies
-
Fine with me. Squash merge strategy is what we use on my other repos. |
Beta Was this translation helpful? Give feedback.
-
I have no particular opinion but it sounds nice :) |
Beta Was this translation helpful? Give feedback.
-
I do generally consider the commit history as much part of a change as the code itself and hence do not like squash merging. I also never felt the need to use it since curating commits and hence interactive rebases and force pushes are just part of my workflow. But, there is not a lot of work in flow for me with the last PR being quite old and in review limbo, so I do not want to block this change. I especially agree with the argument of making it easier for new and/or one-time contributors. I don't think multiple PR will help though, as that is too much ceremony IMHO and it will be detrimental to a coherent discussion which is basically the most important part of the PR user interface. (We already see this for everything that by its nature spans multiple code changes, how fragmented the discussion becomes.) So in summary, I am fine with doing this even though I do not like it. (I do think this is a major blunder of GitHub as a platform though which has done a lot to simplify communication in open source projects but is targeted a bit too much on their paying enterprise customers when it comes to the actual processes.) |
Beta Was this translation helpful? Give feedback.
-
A quick heads-up: based on the above responses I'm going to change the setting now, as there's at least 3 PRs which are ready to merge but worth squashing. Thanks all 👍 |
Beta Was this translation helpful? Give feedback.
-
At the moment we use the merge commit strategy on the merge queue. We chose this strategy because occasionally we like to preserve multiple git commits in a single PR.
Because we like to keep a meaningful git history, the downside of this strategy is that often we ask contributors to squash pull requests (or sometimes I do this myself). Contributors almost always need to do a squash & force-push to add a newsfragment. The force-pushing can also disrupt PR review a bit, by making it harder to see what got added since the last round of review.
Recently I've been working with the squash-merge strategy on the
pydantic
repositories, and I'm quite liking it. The result of getting a single commit at merge without needing to go through a lot of force-push ceremony on every PR can save time and makes review a bit easier to.As a result, I'd quite like to switch to using the squash-merge strategy on PyO3 too. I think optimising for easier PR process is worth it, and on the infrequent occasion where we do want multiple commits, we can always fall back to multiple PRs.
Maybe in the future GitHub even makes it possible to choose the merge queue strategy on each PR so we can choose case-by-case, like we used to before we adopted bors.
Any concerns or objections? Otherwise, I propose to switch this setting next week sometime.
Beta Was this translation helpful? Give feedback.
All reactions