Computer Science 491
Senior Seminar

Dickinson College
Fall Semester 2018
Grant Braught

Patching a FOSS Project
Introduction

In our Git/GitHub Workflow Activity we saw pull requests as one mechanism by which contributions from the community can be integrated into a project. The diff and patch tools provide another mechanism that many H/FOSS projects use to accept community contributions. For example, Freeciv has a patch process for accepting contributions.

This activity will give you some experience with diff and patch using a the modifications that you made to Freeciv in the Getting Around in a FOSS Project Activity.

Prerequisites

Before starting work through the tutorial below. The Hello World example will introduce you to the use of the unix diff and patch tools:

Assignment

In this assignment you will practice creating and applying patches. In particular you will create a single file patch for the changes you made to the text.c file in Freeciv and then apply that patch to a clean copy of the project. You will then create a patch that captures all of the changes you made to the full source tree and apply that patch to a clean copy of the project.

Getting Started

Making a Single-File Patch

Applying a Single-File Patch

Making a Project Patch

Applying a Project Patch

Patches in a VCS


Acknowledgements: This assignment builds from and adapts ideas and content from the following activities created by others: