diff options
Diffstat (limited to 'railties/guides/source/contributing_to_ruby_on_rails.textile')
-rw-r--r-- | railties/guides/source/contributing_to_ruby_on_rails.textile | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/railties/guides/source/contributing_to_ruby_on_rails.textile b/railties/guides/source/contributing_to_ruby_on_rails.textile index 9739da2666..82e7edfc84 100644 --- a/railties/guides/source/contributing_to_ruby_on_rails.textile +++ b/railties/guides/source/contributing_to_ruby_on_rails.textile @@ -349,7 +349,20 @@ $ git commit -a $ git format-patch master --stdout > my_new_patch.diff </shell> -Sanity check the results of this operation: open the diff file in your text editor of choice and make sure that no unintended changes crept in. +Open the diff file in your text editor of choice to sanity check the results, and make sure that no unintended changes crept in. + +You can also perform an extra check by applying the patch to a different dedicated branch: + +<shell> +$ git checkout -b testing_branch +$ git apply --check my_new_patch.diff +</shell> + +Please make sure the patch does not introduce whitespace errors: + +<shell> +$ git apply --whitespace=error-all mynew_patch.diff +</shell> You can check your patches by applying your patch to an different dedicated branch: |