*** Welcome to piglix ***

Patch (Unix)


The computer tool patch is a Unix program that updates text files according to instructions contained in a separate file, called a patch file. The patch file (also called a patch for short) is a text file that consists of a list of differences and is produced by running the related diff program with the original and updated file as arguments. Updating files with patch is often referred to as applying the patch or simply patching the files.

The original patch program was written by Larry Wall (who went on to create the Perl programming language) and posted to mod.sources (which later became comp.sources.unix) in May 1985. A variant of the program (but not the only one) is part of the GNU project and is maintained by the FSF.

Developed by a programmer for other programmers, patch was frequently used for updating of source code to a newer version. Because of this, many people came to associate patches with source code, whereas patches can in fact be applied to any text. Patched files do not accumulate any unneeded text, which is what some people perceive based on the English meaning of the word; patch is as capable of removing text as it is of adding it.

Patches described here should not be confused with binary patches, which, although can be conceptually similar, are distributed to update binary files comprising the program to a new release.

The diff files that serve as input to patch are readable text files, which means that they can be easily reviewed or modified by humans before use.

In addition to the "diff" program, diffs can also be produced by other programs, such as Subversion, CVS, RCS, Mercurial and Git.

Patches have been the crucial component of many source control systems, including CVS.


...
Wikipedia

...