Create patches using quilt

From KoanSoftware Wiki
Revision as of 13:49, 2 August 2017 by Koan (talk | contribs) (Created page with "== How to create patches using quilt == Quilt is a tool to manage large sets of patches by keeping track of the changes each patch makes. Patches can be applied, un-applied...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

How to create patches using quilt

Quilt is a tool to manage large sets of patches by keeping track of the changes each patch makes. Patches can be applied, un-applied, refreshed, etc. The key philosophical concept is that your primary output is patches.

With quilt, all work occurs within a single directory tree. Commands can be invoked from anywhere within the source tree. They are of the form quilt cmd similar to CVS, svn or git commands. They can be abbreviated as long as the specified part of the command is unique. All commands print some help text with quilt cmd -h.


This is the typical workflow

$ cd <source_directory>

Create a new patch with the specified file name, and insert it after the topmost patch. The name can be prefixed with a sub-directory name, allowing for grouping related patches together.

$ quilt new mytmpwork.patch

...select the file/s you want to modify...

$ quilt file1.c

...edit the file and eventually...

$ quilt refresh
$ quilt diff > modifications.patch