Product SiteDocumentation Site

Chapter 7. Fixing_the_Code

Jeff Sheltren

Oregon State University (OSU) Open Source Labs (OSL)
7.1. Introduction: Patches Welcome
7.2. What is a Patch?
7.2.1. Example of a Simple Patch
7.2.2. Exercise - Compare diff formats
7.3. Naming Conventions
7.4. Comparing Multiple Files
7.5. Patches Generated with Subversion
7.6. Applying a Patch
7.7. Submitting a Patch
7.8. Exercise - Create a Patch for a New File
7.9. Exercise - Patch echo
7.10. Exercise - Fix a Real FOSS Bug

7.1. Introduction: Patches Welcome

Most open source communities are very welcoming to people who are interested in fixing bugs or adding new features to a project. Patches are not only welcome, they are encouraged! It's important, however, to know how to create a proper patch and how to submit a patch to a community for possible integration into the code base.
This chapter introduces the patch file format and shows how to create and apply patches. It covers patches created both with and without a source code management (SCM) system, and introduces best practices to follow when creating patches and submitting those patches to a FOSS project.