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