This page documents how to submit your changes to us for inclusion.
We manage the submission of patches using the Gerrit code review tool. This tool implements a workflow on top of the Git version control system to ensure that all changes get peer reviewed and tested prior to their distribution.
Browse to https://chromium.googlesource.com/ and login with your Google account (Gmail credentials, for example). Next, follow the Generate Password link at page top. You'll be given instructions for creating a cookie to use with our Git repos.
You will be required to execute a contributor agreement to ensure that the WebM Project has the right to distribute your changes.
Look-up the URL for the project you'd like to work on, listed under pull on our Code page.
To clone the project repository on your local machine, give a command similar to the following:
$ git clone https://chromium.googlesource.com/webm/libvpx ~/working
The above creates a clone of the repo at
Gerrit requires that each submission include a unique
can assign one manually using
git commit --amend, but it's easier to
automate it with the
commit-msg hook provided by Gerrit.
commit-msg to the
.git/hooks directory of your local repo.
$ curl -Lo <local repo>/.git/hooks/commit-msg https://chromium-review.googlesource.com/tools/hooks/commit-msg
Next, ensure that the downloaded
commit-msg script is executable:
$ chmod u+x <local repo>/.git/hooks/commit-msg
See the Gerrit documentation for more information.
Find the correct URL to push to on the main code page and determine the branch you want your change to start on by looking at our repository layout. You can set up your Git and SSH configurations to simplify this command line quite a bit. See the Gerrit documentation for more information. The command you'll use is of the general form:
$ git push https://chromium-review.googlesource.com/webm/<projectname> HEAD:refs/for/<branchname>
If you previously uploaded a change to Gerrit and the Approver has asked for changes, follow these steps:
Edit the files to make the changes the Approver has requested.
Recommit your edits using the
--amend flag, for
$ git commit -a --amend
Use the same
git push command as above to upload to Gerrit again
for another review cycle.
In general, you should not rebase your changes when doing updates in response to review. Doing so can make it harder to follow the evolution of your change in the diff view.
If your commit does not include a 'Change-Id:' line in its commit
message (see commit-msg Hook, above), you'll have to
add one. Do so by running
git commit --amend to edit the
commit message, and then create a 'Change-Id: I ...' by using the ID
number of the change you're trying to update, which can be found using
the web UI.
Once your change has been Approved and Verified, you can "submit" it through the Gerrit UI. This will usually automatically merge your change into the branch you specified, creating a new merge commit in Git if neccessary. Sometimes this can't be done automatically. If you run into this problem, you must rebase or merge your changes manually. We strongly prefer that you rebase your changes instead of merging them. To do so, run:
$ git fetch $ git rebase origin/branchname
If you get any conflicts, resolve them as you normally would with Git. When you're done, reupload your change.
To check the status of a change that you uploaded, open Gerrit, sign in, and click My > Changes.