Documentation / git-patch-id.txton commit Merge branch 'er/python-version-requirements' (48b7f52)
   1git-patch-id(1)
   2===============
   3
   4NAME
   5----
   6git-patch-id - Compute unique ID for a patch
   7
   8SYNOPSIS
   9--------
  10[verse]
  11'git patch-id' < <patch>
  12
  13DESCRIPTION
  14-----------
  15A "patch ID" is nothing but a SHA1 of the diff associated with a patch, with
  16whitespace and line numbers ignored.  As such, it's "reasonably stable", but at
  17the same time also reasonably unique, i.e., two patches that have the same "patch
  18ID" are almost guaranteed to be the same thing.
  19
  20IOW, you can use this thing to look for likely duplicate commits.
  21
  22When dealing with 'git diff-tree' output, it takes advantage of
  23the fact that the patch is prefixed with the object name of the
  24commit, and outputs two 40-byte hexadecimal strings.  The first
  25string is the patch ID, and the second string is the commit ID.
  26This can be used to make a mapping from patch ID to commit ID.
  27
  28OPTIONS
  29-------
  30<patch>::
  31        The diff to create the ID of.
  32
  33GIT
  34---
  35Part of the linkgit:git[1] suite