Contribute/SubmitAPatch: Difference between revisions

From QEMU
No edit summary
No edit summary
Line 1: Line 1:
All contributions to QEMU are '''sent as patches''' to the qemu-devel [[MailingLists|mailing list]]. Patch contributions should not be posted on the bug tracker, posted on forums, or externally hosted and linked to.
QEMU welcomes contributions of code (either fixing bugs or adding new functionality). However, we get a lot of patches, and so we have some guidelines about submitting patches. If you follow these, you'll help make our task of code review easier and your patch is likely to be committed faster.


You get a better chance to get a reply if you follow the LKML rule of send directly to the maintainer of the portion of the patch (see MAINTAINERS file). Also keep attention to reply to all and not just the sender.
 
All contributions to QEMU must be '''sent as patches''' to the qemu-devel [[MailingLists|mailing list]].  Patch contributions should not be posted on the bug tracker, posted on forums, or externally hosted and linked to.
 
Send patches to the mailing list and '''CC the relevant maintainer''' -- look in the MAINTAINERS file to find out who that is.
 
When replying to comments on your patches '''reply to all and not just the sender''' -- keeping discussion on the mailing list means everybody can follow it.


Consider also to prefix your patch commit messages with the portion you changed (ie: block or tcg).
Consider also to prefix your patch commit messages with the portion you changed (ie: block or tcg).
Line 7: Line 12:
'''Send patches inline''' so they are easy to reply to with review comments.  Do not put patches in attachments.
'''Send patches inline''' so they are easy to reply to with review comments.  Do not put patches in attachments.


'''Patch emails must include a Signed-off-by: line'''.  For more information see [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/SubmittingPatches;h=689e2371095cc5dfea9927120009341f369159aa;hb=f6f94e2ab1b33f0082ac22d71f66385a60d8157f#l297 SubmittingPatches 1.12].
'''Patch emails must include a Signed-off-by: line'''.  For more information see [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/SubmittingPatches;h=689e2371095cc5dfea9927120009341f369159aa;hb=f6f94e2ab1b33f0082ac22d71f66385a60d8157f#l297 SubmittingPatches 1.12]. This is vital or we will not be able to apply your patch!


'''Follow the coding style''' and run ''scripts/checkpatch.pl <patchfile>'' before submitting.  See also:
'''Follow the coding style''' and run ''scripts/checkpatch.pl <patchfile>'' before submitting.  See also:

Revision as of 15:57, 11 November 2011

QEMU welcomes contributions of code (either fixing bugs or adding new functionality). However, we get a lot of patches, and so we have some guidelines about submitting patches. If you follow these, you'll help make our task of code review easier and your patch is likely to be committed faster.


All contributions to QEMU must be sent as patches to the qemu-devel mailing list. Patch contributions should not be posted on the bug tracker, posted on forums, or externally hosted and linked to.

Send patches to the mailing list and CC the relevant maintainer -- look in the MAINTAINERS file to find out who that is.

When replying to comments on your patches reply to all and not just the sender -- keeping discussion on the mailing list means everybody can follow it.

Consider also to prefix your patch commit messages with the portion you changed (ie: block or tcg).

Send patches inline so they are easy to reply to with review comments. Do not put patches in attachments.

Patch emails must include a Signed-off-by: line. For more information see SubmittingPatches 1.12. This is vital or we will not be able to apply your patch!

Follow the coding style and run scripts/checkpatch.pl <patchfile> before submitting. See also:

Split up longer patches into a patch series of logical code changes. Each change should compile and execute successfully.

For smaller patches in less frequently changed areas of QEMU, consider using the trivial patches process.

If you fix issues that are raised during review resend the entire patch series not just the one patch that was changed. This allows maintainers to easily apply the fixed series without having to manually identify which patches are relevant.

When resending patches add a v2/v3 suffix (eg [PATCH v2]). This means people can easily identify whether they're looking at the most recent version. (The first version of a patch need not say "v1", just [PATCH] is sufficient.)

For later versions of patches include a summary of changes from previous versions, but not in the commit message itself. In an email formatted as a git patch, the commit message is the part above the "---" line, and this will go into the git changelog when the patch is committed. This part should be a self-contained description of what this version of the patch does, written to make sense to anybody who comes back to look at this commit in git in six months' time. The part below the "---" line and above the patch proper (git format-patch puts the diffstat here) is a good place to put remarks for people reading the patch email, and this is where the "changes since previous version" summary belongs.