5 ms·
What advantages do you see in Gerrit? Do they require a lot of experience in order to be realized?
by epistasis 6y ago
What advantages do you see in Gerrit? Do they require a lot of experience in order to be realized?
- q3k 6y agoClear mapping of change request == commit, allowing for easy building of multiple in flight change requests, rearranging them by using git rebase, updating with push to refs/for/master. Easy diffing between states of the CR (patch sets), so you can see what changes since the last round of comments, even if it spanned multiple updates. This is the feature I miss the most from other code review systems - be able to easily work on another commit that bases on one that I just sent out for review (even starting review on the new while the parent still hasn't finished being reviewed!), and rebasing my current change as the parent change gets reviewed/updated. Possibility to send out a PR for review using just a push (change message in commit, push to refs/for/master%r=foo). Snappy and compact code review experience (no space wasted for whitespace, avatars, pretty buttons). Full coverage with keyboard shortcuts. Powerful review rule system based in Prolog, allowing for things like code owners, experimental subdirectories without the need for review, etc.
- dionian 6y ago> Clear mapping of change request == commit, was forced to use Gerrit by a client. I could never get the hang of this, I like to do frequent commits on short lived branches and using vanilla git. I never wanted any more features other than a nice UI to encourage people to review.
- q3k 6y agoThe nice UI for review works well exactly because it limits the functionality available to users and enforces a particular commit model. If you don't do that, you get the code review mess that are Github/GitLab PRs/MRs - difficult to tell apart how commits relate to the change and how it progresses through review, because the entire branch history is free-form.
- kevincox 6y agoIt's possible to allow users to have multiple commits but still show review between the submitted "tip" commits. If you want you don't even need to show the other commits in the UI.
- detaro 6y agoOne thing one has to get away from that one change request == one issue. Multiple small commits as separate change requests for one story are fine as long as they work standalone (which is generally a good idea, e.g. to enable bisecting)
- js2 6y agoI much prefer the model of force-pushing your development branch to create change sets. It lets you more easily see how development evolves in response to feedback. And the final state of the branch which gets merged leaves all the in-progress work that no one cares about behind only in Gerrit. With Github/lab's model, if you force push your PR, you lose the ability to view its previous state and diff against that. Alternately, if you just keep adding commits, then the final branch that gets merged (unless you squash) has all the in-progress work which pollutes the repo's history. Gerrit also has a finer grained permission model, but I don't care as much about that. Gerrit definitely expects the user to understand how git works conceptually a bit more than Github/lab.
- nemetroid 6y ago> With Github/lab's model, if you force push your PR, you lose the ability to view its previous state and diff against that. That's not quite true. Gitlab lets you compare any two "versions" of the force pushed branch.
- js2 6y agoThanks. I haven’t used gitlab. I assumed it worked the same as GitHub. That’s good to know.
- kevincox 6y agoYup, GitLab works as expected here. It's always surprised me how quickly the old commit is garbage-collrcted when you force-push a branch on GitHub. It causes weird errors in CI runs and breaks viewing the old commits. Seriously I'll pay for those couple of KiB of space, just keep it around. (at least until the PR is closed)
- 0x0 6y agoGitlab DOES let you compare different versions of changesets in a merge request: https://docs.gitlab.com/ee/user/project/merge_requests/versions.html https://docs.gitlab.com/ee/user/project/merge_requests/versi...
- 6y ago