blob: a7e9fd021a4cc1e467b2df7dd7e06d79a5182c7a [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-patch-id(1)
2===============
3
4NAME
5----
Junio C Hamano7c73c662007-01-19 00:37:506git-patch-id - Compute unique ID for a patch
Junio C Hamano1a4e8412005-12-27 08:17:237
8SYNOPSIS
9--------
10'git-patch-id' < <patch>
11
12DESCRIPTION
13-----------
14A "patch ID" is nothing but a SHA1 of the diff associated with a patch, with
15whitespace and line numbers ignored. As such, it's "reasonably stable", but at
Junio C Hamano341071d2006-06-04 07:24:4816the same time also reasonably unique, i.e., two patches that have the same "patch
Junio C Hamano1a4e8412005-12-27 08:17:2317ID" are almost guaranteed to be the same thing.
18
19IOW, you can use this thing to look for likely duplicate commits.
20
21When dealing with git-diff-tree output, it takes advantage of
22the fact that the patch is prefixed with the object name of the
23commit, and outputs two 40-byte hexadecimal string. The first
24string is the patch ID, and the second string is the commit ID.
25This can be used to make a mapping from patch ID to commit ID.
26
27OPTIONS
28-------
29<patch>::
30The diff to create the ID of.
31
32Author
33------
34Written by Linus Torvalds <torvalds@osdl.org>
35
36Documentation
37--------------
38Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
39
40GIT
41---
42Part of the gitlink:git[7] suite
43