Hi,

it seems all Openwhisk github repositories are configured to only allow 
"Rebase" and "Squash" options for the PR merge button. IIUC, the idea is to 
enforce linear histories and prevent "annoying" merge commit messages in the 
history.

I wonder if it could be changed so that:

  *   merge commits are allowed as well
  *   developers are strongly encouraged to use rebase or squash unless an 
exceptional case requires merge (see below)

WDYT?

Details:

There is a downside to preventing merge commits: in case there are concurrent 
branches, one cannot merge without conflicts. For example, I have been working 
on a couple of smaller PRs for wskdebug. Since I have to wait for reviews 
(might be > 1 day), I have been submitting multiple PRs in parallel, otherwise 
I would be super slow or would create monster PRs addressing multiple 
features/bugs in one that nobody wants to review ;-)

Sometimes I can't do them independently, but have to base one on top of the 
other. This might be if the first PR is some refactoring work, and the next PR 
must happen on top of that. Example PRs [1] and [2].

Unfortunately, this limitation leads to an unnecessary conflict when resolving 
the PRs: if the first PR is rebased/squashed onto master, the version history 
is rewritten, so the 2nd PR's changes will be seen as a conflict (in areas 
where the 2nd PR makes changes on top of the 1st PR).

This seems unfortunate, as git is well equipped to handle this (one of it's key 
features!).

I agree with preferring clean histories without a lot of "merge" commits on 
master. However, in some cases it's not avoidable without creating extra work 
and friction. In our in-house development we address this by allowing all 
options on PRs, but ask people to avoid merging unless necessary. This way you 
still avoid the majority of merge commits on master. Works fine.

[1] https://github.com/apache/openwhisk-wskdebug/pull/56
[2] https://github.com/apache/openwhisk-wskdebug/pull/58/

Cheers,
Alex

Reply via email to