Skip to content

For Developers: Submitting Patches

Jason Gerecke edited this page Feb 16, 2022 · 13 revisions

A patchset that is suitable for merging has to meet a number of formal requirements:

  • Each commit in the patchset must have a well-formatted and meaningful commit message.
  • Each commit in the patchset must compile without errors.
  • Each commit in the patchset should not produce compiler warnings.
  • The patchset as a whole must pass the driver's test suite.
  • The patchset as a whole should pass Github's automated test suite.

A "Pull Request" can be submitted for a patchset once it meets the above requirements. Please see Github's documentation for specific details. Briefly, however, the process is as follows:

  1. Verify your changes meet the requirements above.
  2. Push your branch with the changes up to your fork on Github.
  3. Go to your fork of the project on Github
  4. If you see a banner to create a pull request for the branch, click "Compare & pull request". Otherwise:
    1. Click on the "Branches" button to see a list of all of the branches in your fork
    2. Find the branch you want to create a pull request for
    3. Click the "New pull request" button for that branch
  5. Ensure the pull request summary and description explain the changes being made.
  6. Verify the list of commits (below the summary) is correct.
  7. Click the "Create pull request" button.

Review Process

Once submitted, it may take several days for someone to review your pull request. In the best case, your patch will be accepted without changes. Many patches however need some modification before they can be merged. Don't take it badly; even the maintainers of the driver regularly re-do the patches after review. The main goal is to have an easy to understand, bug-free, maintainable codebase.

If you do have to make changes, you should continue to make them in the same branch you were previously working with. You can add new commits or edit old commits by using git rebase. Once your modifications are complete, push your branch to your fork on Github again. You may need to "force push" the changes if you edited any old commits. The Github machinery will see that changes have been made to your branch and automatically update the pull request. You may wish to post a comment in the pull request to notify the maintainers that a new version is ready for review.

Clone this wiki locally