3 ms·
> Article says: > Gerrit, he said, makes patch submission quite hard > But without any explanation for why. You need to add hooks to inject a Change-Id into
by gurkendoktor 10y ago
> Article says:
> Gerrit, he said, makes patch submission quite hard
> But without any explanation for why.
You need to add hooks to inject a Change-Id into every commit, and be careful that they're still "fresh" (e.g. you cannot reuse one from an abandoned branch if you want to re-submit it).
And you must push a diff to the server so it can be submitted to Gerrit. If your feature branch is up-to-date (you just force-pushed it), you cannot submit the same commit to Gerrit.
And it gets worse when you have developers who rely on an IDE to get work done – the IntelliJ plugin for Gerrit is pretty buggy (I think it's okay for submitting now, but reviewing was still frustrating last month).
- Confusion 10y agoIf your feature branch is up-to-date (you just force- pushed it), you cannot submit the same commit to Gerrit. It sounds to me like this is where it's going wrong. If Gerrit is not also hosting your 'origin' git repositories and acting as a gatekeeper for any commit to be added to it, then you are working against the system. I don't see the problem with hooks and we rarely have problems with Change-Ids not being 'fresh' anymore (that sounds like the result of a suboptimal workflow). Bugs in plugins are of course not a good reason to say Gerrit isn't very good. That's like saying git itself sucked when the IntelliJ plugin for git still had annoying bugs.
- gurkendoktor 10y ago> If Gerrit is not also hosting your 'origin' git repositories and acting as a gatekeeper for any commit to be added to it, then you are working against the system. It is/was. But if I push my work to origin/features/foo, then push the same commit to refs/for/master, it will not create a review because no new commit has been introduced. At least that's my experience and it is (kind of) spelled out like that in the manual [1]: "Each new commit uploaded by the git push client will be converted into a change record on the server." I've only tried this a couple of times, so hopefully that was a case of PEBKAC. > Bugs in plugins are of course not a good reason to say Gerrit isn't very good. Services like GitLab/GitHub/Bitbucket work with every git GUI out of the box, because all you need to do is to push branches and then open a web browser. With Gerrit, you need to know how to push to a magic URL (especially if you want to specify a topic or message), or you'll need a plugin. I don't blame Gerrit for the low quality of the IntelliJ plugin, but for needing a plugin in the first place. [1] https://gerrit-review.googlesource.com/Documentation/user-upload.html#_git_push https://gerrit-review.googlesource.com/Documentation/user-up...