From: merch-redmine@... Date: 2019-08-09T16:18:10+00:00 Subject: [ruby-core:94226] [Ruby master Misc#16093] Prohibit a "foxtrot merge" instead of a merge commit Issue #16093 has been updated by jeremyevans0 (Jeremy Evans). I prefer rebasing commits on master instead of merging to keep a true linear history, as I find it makes reviewing the history simpler. In my opinion, the "Problem" as specified in the post is not a significant issue, and the disadvantages of allowing merge commits outweigh the advantages. However, I don't have a strong objection if other committers want to allow merge commits. ---------------------------------------- Misc #16093: Prohibit a "foxtrot merge" instead of a merge commit https://bugs.ruby-lang.org/issues/16093#change-80525 * Author: k0kubun (Takashi Kokubun) * Status: Open * Priority: Normal * Assignee: ---------------------------------------- ## Background * When we migrated the canonical Ruby repository from Subversion to Git [Misc #14632], in that ticket nobody had objected to allowing a merge commit in the repository. * However, @mame has [prohibited](https://github.com/ruby/ruby-commit-hook/commit/d7759cca6282741ecc9c46053166a1f5f5779c10#diff-7e61afe505452158c45dfa32ea7d7a14) to push a merge commit to the master branch. * His motivation was to make it possible to efficiently list up revisions to be built by his [rubyfarmer](https://github.com/mame/rubyfarmer) without having a data store. * If we do not make a merge commit, there's only one way to make a pull request "Merged" on GitHub ruby/ruby: * Push commits in the pull requests to the master branch when their parent revision is the same as the master branch's one. * Therefore, we have not been able to make a pull request "Merged" when a pull request's branch needs to be rebased before pushing it to the master branch. * But force-pushing the rebased commits to their author's branch is a bad habit and we do not want to do so. ## Problem * Some contributors get confused when their pull request is committed to the master branch but it's marked as "Closed" on GitHub [Misc #16089]. * Even though we clarified the situation in https://bugs.ruby-lang.org/projects/ruby/wiki/HowToContribute, a first-time contributor could be confused and the person might complain about it to the committer. ## Solution 1. Improve the rubyfarmer's implementation to make it work even if we had merge commits. https://github.com/mame/rubyfarmer/pull/1 2. To maintain a consistent linear history in the git log even after allowing merge commits, implement a guard to prevent a ["foxtrot merge"](https://blog.developer.atlassian.com/stop-foxtrots-now/) in the pre-receive hook. * Details: https://devblog.nestoria.com/post/98892582763/maintaining-a-consistent-linear-history-for-git 3. Allow pushing merge commits to the master branch. I'll implement the 2 and 3 soon, assuming that @mame had been the only person who had an objection to merge commits. Please let me know if you have any opinion about this. -- https://bugs.ruby-lang.org/ Unsubscribe: