How to publish a patch on the web

One of benefits that we get from Open Source is that we have right to see and modify source codes to meet our need independently to the developer team. In other words, we don't have to wait the developer team to implement such a feature. Instead of that, I am able to implement it myself and then make a patch as a contribution to the developer team and other users.

As of now, I made patches for several projects and one of them is the patch for multiping to run on Drupal 5. I supposed that it might work for all users but not. After investigation, I found the problem and how to properly publish a patch on the web.

In summary, there were 2 problems with my patch.

  1. Incorrect formatting of the patch due to markdown filter
  2. Incorrect whitespace due to TAB

And my workaround are as follows.

  1. Use
    to wrap the patch.
  2. Upload the patch as attachment instead.

Normally, the first solution is enough in most case as well as with TAB characters in the patch. If the patch contains TAB, you have to use option -l to the patch command to ignore all whitespaces.

patch -l -f multiping-drupal5.patch

Tags: , , ,

Post new comment