
----- Original Message -----
From: "Martin Sivak" <msivak@redhat.com> To: "Sven Kieske" <s.kieske@mittwald.de> Cc: devel@ovirt.org Sent: Wednesday, September 17, 2014 12:27:29 PM Subject: Re: [ovirt-devel] Stable branch gerrit hook and Related-To: bug
Hi,
Why should an incomplete, thus non working feature get merged? Do you also merge incomplete bugfixes? One commit should contain one feature or one bugfix, imho?
Let me rephrase your sentence a bit:
One commit should contain one self-contained and isolated change.
But that does not mean the change is enough to fix the referenced bug.
Example:
Imagine a situation where you need to add new API to networking part, extend the API in the storage area and then add something new that uses it. Doing this all in a single patch is hard because:
1) All reviewers will have to go through all the code 2) If the development takes time you have to solve conflicts in all the areas all the time
On the other hand if you split that into three patches:
- Network API improvement (you can go even further and add it call by call where each patch contains new call and relevant test) - Storage API change - New feature
Then it is much easier to review. And you can merge the API changes as soon as they are ready and avoid future merge conflicts. Gerrit actually supports this workflow in the form of topic branches.
-- Martin Sivák msivak@redhat.com Red Hat Czech RHEV-M SLA / Brno, CZ
----- Original Message -----
Why should an incomplete, thus non working feature get merged? Do you also merge incomplete bugfixes?
One commit should contain one feature or one bugfix, imho? I know this can be difficult sometimes, but still, at least in the master branch this rule should get enforced, maybe create a staging branch for incomplete features?
On 16/09/14 14:53, Martin Sivak wrote:
it would mean that feature cannot be merged before it is completed.
-- Mit freundlichen Grüßen / Regards
Sven Kieske
Systemadministrator Mittwald CM Service GmbH & Co. KG Königsberger Straße 6 32339 Espelkamp T: +49-5772-293-100 F: +49-5772-293-333 https://www.mittwald.de Geschäftsführer: Robert Meyer St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen
Somehow I feel this is being discussed to death. We sometimes have features which take more than a single version to develop and we need to merge some of the work as an infrastructure. In whichcase the above suggestion makes sense, as working out of tree for more than a version is almost impossible. So, if someone has any hard objection or a new argument please step forward. Otherwise I see no reason to deny this suggestion which will assist developers as long as they keep the above guidelines. Doron