GitHub rolled out a new feature:

https://github.com/blog/2141-squash-your-commits

Essentially it gives people who merge a PR the option that instead of creating a merge commit with one parent being "master" (or the target branch) and the other being a PR branch, create a single commit with all the commits from the PR squashed into one, with no merge commit.

In the context of our repos, I'm not sure it's very useful, and I think it should be turned off. My arguments are:

1. It makes bisecting more difficult because you can no longer tell which PR a commit belongs to just from the DAG.

It is still sort-of possible if you take the commit hash, paste it into your browser's address bar (e.g. https://github.com/D-Programming-Language/phobos/commit/8dc29bff62fc7c2f806e08cccc01be55923fa83b) - GitHub will add links to the pull request this commit was a part of at the top. I'm not aware of a way to do it programmatically (other than scraping the website).

2. It makes bisecting more difficult because all commits are squashed into one.

Clearly this option should not be used for large PRs where the commits are already separate self-contained changes in the first place. This doesn't apply when the PR author sends off a bunch of fixup PRs without amending/rebasing, in which case it can be useful.

3. It makes bisecting more difficult because it breaks Digger :) Although I could probably add support for such merges, I'd rather not :)

4. We should use the autotester's auto-merge feature anyway.

In theory the autotester could be improved to allow choosing which merge style to use... in theory.

5. It will create merge conflicts if the PR branch is used elsewhere.

Not sure if this applies to just me, but when I submit a PR to scratch a personal itch, I will probably use the branch locally too... when the PR is merged into master, updating my personal branch is normally painless, however this this will put a stick to this wheel.

As such, I propose to disable the feature completely for the core D-P-L repositories, so that it's unavailable to committers when merging PRs.

Reply via email to