For me as a developer, this workflow question is the most important one.
I been playing around with the GitLab test instance today. I really like it... up until to the point I tried to get actual development done.
It is not practical to properly chunk out big changes properly for review with GitLab without history rewriting (i.e. force push). My requirements are:
- chaining dependent changes together
- independent iteration of those changes based on code review
- approving and preferably merging changes independently
Gerrit deals with the problem by having append-only patchset versions and nice way to link them together (no force-push needed).
GitLab seems to primarily support doing it at merge-time. The UI has very limited support for it (only squash and rebase or merge commit). Full power of git rebase -i is needed. If we only allow history rewriting during merge-time, we have multiple issues: the person doing the merge now has the burden to rewrite the history, which in Gerrit is done by the author (except trivial rebases), and they must be able to push directly to the target branch (this would likely be disabled for master branch) and thirdly, the worst thing in my opinion, the result would not be reviewed. All this goes away if we allow history rewriting and force-push updates to the merge request (with sufficient UI support so that reviewers can do their job).
Things get even worse if we also want to independently merge the changes. This means they have to be split into multiple merge requests. I found no support for rebasing merge request chains. In my testing you either have to work backwards and merge latest merge request to earlier one first (frankly, nobody does that), or doing manual force-push for each merge request. Gerrit provides a handy button that does it for most of the simple cases. When you merge a first merge request from a chain in GitLab, the UI gives up. You can change the merge target manually (away from the now [hopefully] non-existing target branch) in the UI, but then, if you squashed or rebased the first merge request, it forces you do do a manual rebase and and force-push to update the subsequent merge requests.
GitLab seems a good solution for work that produces reasonable sized merge requests. However, the suitability of GitLab for me depends on its support for non-trivial history rewriting, which is required to develop and review work that consists of chained changes. Moreover, the only way to do that in GitLab is force-push to a merge request. So the suitability of GitLab essentially hinges on its support for force-push type of workflow.
Lack of a good support for such workflow would, in my opinion, lead to:
- messy histories with irrelevant and untestable commits, and/or
- slower development and code review burnout due to difficult to review mega-changes, and/or
- slower development due to having to wait for author or code-reviewer to complete previous steps before being able to proceed.