• What is
    • a patch
      A patch is a piece of code written in some computing language that when added to a main program it enables the original program to do actions that was unable before (or viceversa). For example Pine does not report how many new messages exist in an incoming folder before you decide to open, or not, such folder, but a patch can give pine the ability to do so.
       
    • a Hunk
      Every patch is composed of a finite number of Hunks. Every hunk contains the necessary information to patch a file. This information includes the old code as well as the new code. For most patches in this web page, hunks are separated by the string *************** at the beginning of a line. For example:

       
      ***************
      *** 139,144 ****
      --- 139,149 ----
             pico_all_done = 0;
             km_popped = 0;
       
      +      if (pm->auto_cmds){
      + #define CTRL_X 24
      +      if ((pm->auto_cmds[0] == CTRL_X) && (pm->auto_cmds[1] == 'y')){
      +         return (1);}}
      +        if(!vtinit())     /* Init Displays. */
            return(COMP_CANCEL);
       
       
      is a Hunk. When a patch is being applied 1 or more hunks are being applied to the same file.

       

      See also:
      How do I apply a patch?
      How do I read a patch?
      How do I know if the patch was applied correctly?

       

    • a diff file
      A diff file is the file that contains the patch. Its name comes from the fact that these kind of files is created by recording what the added code to a program is by comparing it with the original, this means that it records the differences between two files.
       
    • to apply a patch

      To apply a patch is the process of adding the extra code to the "clean" program. You get a new program, which after compiled should have the new feature that you are expecting to get for applying the patch.
       

      See also How do I apply a patch?
       

    • to reverse a patch
      Reversing a patch is your ability to return to the original code without the patch, which means a make believe that nothing ever happened to the program, no code was ever added.
       

      See also How do I reverse a patch?