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