Ohloh uses Git for all source control and patch management.

Please submit only Git patches generated by git format-patch. Only Git patches will include your authorship information, as well as commit IDs which are invaluable when merging your patches into the source tree.

How To Submit a Patch

To submit or download a patch, you must have a local Git repository:

git clone git://labs.ohloh.net/git/ohcount.git

Commit your changes to your local Git repository. Then export your changes to a patch file:

git-format-patch -1

The above example exports the most recent commit. git-format-patch has many options. See http://www.kernel.org/pub/software/scm/git/docs/git-format-patch.html for more explanations.

By default, git-format-patch will create a file with a name like 0001-my-changes.patch.

Upload this file as an attachment to a Trac ticket. If an appropriate ticket does not already exist, feel free to create a new ticket. Provide a clear explanation of what your patch does.

Check the CodingStyleGuidelines before you submit!

How to Apply a Patch

If you are interested in trying out a patch you find in a ticket, you can download it and apply it to a local Git repository.

First, download the file and save it on your local hard disk.

Next, create a new branch in your local Git repository:

git checkout -b experimental

Do not apply a patch directly to your master branch unless you are 100% sure you want the patch!

Apply the patch. In this example, we are applying a patch file named ~/0001-my-changes.patch:

git am ~/0001-my-changes.patch

Once you are sure that you like the changes made in the patch, you can merge the change to your master development line:

git checkout master
git pull . experimental