Skip to content
This repository
Browse code

Added some new advice on applying patches

  • Loading branch information...
commit 9b01284c3e20bd667a43b3bae48a92c4d280f4fd 1 parent 67af97c
Lars Smit authored fxn committed
14 railties/guides/source/contributing_to_ruby_on_rails.textile
Source Rendered
@@ -351,6 +351,20 @@ $ git format-patch master --stdout > my_new_patch.diff
351 351
352 352 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.
353 353
  354 +You can check your patches by applying your patch to an different dedicated branch:
  355 +
  356 +<shell>
  357 +$ git checkout -b testing_branch
  358 +$ git apply --check my_new_patch.diff
  359 +</shell>
  360 +
  361 +You can make sure your patches don't add any whitespace by applying it yourself using the --whitespace=error-all option. Make sure you are on your dedicated test branche and:
  362 +
  363 +<shell>
  364 +$ git apply --whitespace=error-all mynew_patch.diff
  365 +</shell>
  366 +
  367 +
354 368 h4. Create a Lighthouse Ticket
355 369
356 370 Now create a ticket with your patch. Go to the "new ticket": page at Lighthouse. Fill in a reasonable title and description, remember to attach your patch file, and tag the ticket with the ‘patch’ tag and whatever other subject area tags make sense.

0 comments on commit 9b01284

Please sign in to comment.
Something went wrong with that request. Please try again.