Patches to Haiku 101 question

I’ve read the page regarding the topic “Pushing Patches to Haiku 101” and I’ve a question because I’ve a doubt in the process.

Once the git configuration is done properly (with the gerrit account created) and the build tools + haiku repo cloned, is it necessary to create a branch before doing git add/commit and submitting the patch ?

I’m asking the question, because I have the habit in case of PR in the GitHub world (which is not the case here for Haiku) to have a dedicated branch for each new feature or patch.

No,it’s not required to create a new branch for your changes.
You can simply commit to the default branch and push it to Gerrit.
If you work on multiple things at the same time,however,using branches can make it easier to switch between your changes.

No, this is not required.
What is required is to have the commit hook installed before commitung,
this will add a commit id to the change that gerrit uses to identify the commit.

For gerrit it is normal to then receive feedback, update the commit, and then upload it again.

The proposed changes as such get replaced with a new version and you can compare the versions that are uploaded.

This skips the entire adding new commits and then rebasing+squashing thing you have to do in the github workflow.

It’s a bit different, but personally I prefer this way. : )

Feel free to ask follow up questions, and maybe read the gerrit intro if you want a more in-depth explanation Working with Gerrit: An example

2 Likes

OK thanks for confirming this and the useful link :slight_smile:

Well, I’d say it’s better because it lets you organize things however you want locally. Create branches if you want. Don’t create branches if you don’t need them.

So everyone should be happy with that :slight_smile:

1 Like