nim-lang / RFCs

A repository for your Nim proposals.
136 stars 26 forks source link

unselect `Allow merge commits` and `Allow rebase merging` in settings #284

Closed timotheecour closed 3 years ago

timotheecour commented 3 years ago

A lot of PR's have been merged without squash and merge lately [2].

As mentioned many times by me, @xflywind and others [1], PRs need to be merged via squash and merge, otherwise it messes up linear git history, and in particular it messes up git bisect given that we have intermediate broken commits. I and others rely a lot on git bisect as it makes it easy to automate finding regressions, accidental bugfixes and other issues. Not using squash and merge also affects other things, like reverting commits, backporting, etc.

The only way to deal with human errors is to prevent them, and I've already explained how to do it in https://github.com/nim-lang/Nim/issues/8664, and I'm happy to do it myself if you let me do it:

proposal

go to https://github.com/nim-lang/Nim/settings and unselect Allow merge commits and Allow rebase merging. That's it. In the very rare instances where squash and merge isn't adequate, you can temporarily allow those settings.

this happens a lot

[1] https://github.com/nim-lang/Nim/pull/15968#issuecomment-727553560

@Araq So docs commit doesn't squash anymore?

https://github.com/nim-lang/Nim/pull/15957#issuecomment-727053141

I know, it was a simple mistake. Sometimes github defaults to the wrong button for some reason.

[2] image

narimiran commented 3 years ago

go to https://github.com/nim-lang/Nim/settings and unselect Allow merge commits and Allow rebase merging. That's it.

Done.