blob: 90268f02e7381b6f1403e54103988bfde6522073 [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--------
Junio C Hamano15567bc2011-07-23 00:51:5910[verse]
Junio C Hamanofce7c7e2008-07-02 03:06:3811'git patch-id' < <patch>
Junio C Hamano1a4e8412005-12-27 08:17:2312
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
Junio C Hamano341071d2006-06-04 07:24:4817the same time also reasonably unique, i.e., two patches that have the same "patch
Junio C Hamano1a4e8412005-12-27 08:17:2318ID" are almost guaranteed to be the same thing.
19
20IOW, you can use this thing to look for likely duplicate commits.
21
Junio C Hamano1aa40d22010-01-21 17:46:4322When dealing with 'git diff-tree' output, it takes advantage of
Junio C Hamano1a4e8412005-12-27 08:17:2323the fact that the patch is prefixed with the object name of the
Junio C Hamano1de75722009-03-26 08:39:3824commit, and outputs two 40-byte hexadecimal strings. The first
Junio C Hamano1a4e8412005-12-27 08:17:2325string 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>::
31The diff to create the ID of.
32
Junio C Hamano1a4e8412005-12-27 08:17:2333GIT
34---
Junio C Hamanof7c042d2008-06-06 22:50:5335Part of the linkgit:git[1] suite