# phpman > man > diff2patches(1)


*Source: tldr-pages*

---

[diff2patches(1)](https://www.chedong.com/phpMan.php/man/diff2patches/1/markdown)                                                                      [diff2patches(1)](https://www.chedong.com/phpMan.php/man/diff2patches/1/markdown)



## NAME
       diff2patches - Extract non-debian/ patches from .diff.gz files

## SYNTAX
       **diff2patches** _filename_
       **diff2patches** **--help**|**--version**

## DESCRIPTION
       Extracts patches from .diff.gz which apply to files outside the “debian/” directory scope.  A
       patch is created for each modified file.  Each patch is named according to the  path  of  the
       modified file, with “/” replaced by “___”, and an extension of “.patch”.

## OPTIONS
       _filename_
           Extract patches from _filename_ which apply outside the “debian/” directory.

### --help
           Output help information and exit.

### --version
           Output version information and exit.

## FILES
       _debian/control_
              Existence of this file is tested before any patch is extracted.

       _debian/_
       _debian/patches/_
              Patches are extracted to one of these directories.  “debian/patches/” is preferred, if
              it exists.  If _DEB_PATCHES_ is present in the environment, it will override this behav‐
              ior (see “ENVIRONMENT VARIABLES” section below).

## ENVIRONMENT VARIABLES
       **DEB**___**PATCHES**
              When defined and points to an existing directory, patches are extracted in that direc‐
              tory and not under “debian/” nor “debian/patches/”.

## SEE ALSO
       [**combinediff**(1)](https://www.chedong.com/phpMan.php/man/combinediff/1/markdown)

## AUTHOR
       Raphael Geissert <<atomo64@gmail.com>>



Raphael Geissert <<atomo64@gmail.com>>                                                 [diff2patches(1)](https://www.chedong.com/phpMan.php/man/diff2patches/1/markdown)
