Added rudimentary instructions for generating a patch with git. More advanced users will not even need to refer to this section.
diff --git a/ContributionReviews.wiki b/ContributionReviews.wiki index 78385f3..dac2aa5 100644 --- a/ContributionReviews.wiki +++ b/ContributionReviews.wiki
@@ -67,39 +67,24 @@ that new functionality is introduced in one patch, 'enabled' in another one, and the old functionality removed in a third one. -=== Patches (TODO: update this section to describe working with Git.) === +=== Patches === The term "patches" is used to refer to relatively small changes to the -code (and, yes, this definition is intentionally vague). Usually these are in the form of output from the `diff` command. It is easy to think of patches as changesets (commits), that are not part of repository history yet and can be passed around. +code (and, yes, this definition is intentionally vague). Usually these are in the form of output from the `git diff` command. -Patches should be sent for review to the [MailingListsGuidelines#Developer_list developer mailing list] and presented in the "unified `diff`" format, which is de-facto standard for many tools and the output from the `hg diff` command for Mercurial (the same format as that produced by `diff -uNr`). -Using Mercurial: +Patches should be sent for review to the [MailingListsGuidelines#Developer_list developer mailing list] and presented in the "unified `diff`" format, which is de-facto standard for many tools and the output from the `git diff` command (the same format as that produced by `diff -uNr`). +Using Git: {{{ -cd ~/code/melange -hg diff soc/models/new_model.py soc/views/deleted_model.py > my_change.diff +git diff --no-prefix > your-patch-name.patch }}} -or changes between two revisions +The reviewer can then apply the patch using something like: {{{ -hg diff -r REV1:REV2 > my_change.diff +patch -p0 < your-patch-name.patch }}} -In this example, `new_model.py` would be a newly-added module, and -`deleted_model.py` would be a just-deleted module. The reviewer can -then apply the patch using something like: - -{{{ -cd ~/code/melange -hg import my_change.diff -}}} - -The same root approach should be used with -[http://codereviews.googleopensourceprograms.com/static/upload.py `upload.py`] -to submit -[ContributionReviews#Using_Rietveld_for_code_reviews Rietveld code reviews]. - ==== Patch emails ==== Patch emails sent to the developer mailing list should begin with