af97afb3053618a9680e9f28fb3c381a99dee811
[git.git] / man1 / git-patch-id.1
1 .\"Generated by db2man.xsl. Don't modify this, modify the source.
2 .de Sh \" Subsection
3 .br
4 .if t .Sp
5 .ne 5
6 .PP
7 \fB\\$1\fR
8 .PP
9 ..
10 .de Sp \" Vertical space (when we can't use .PP)
11 .if t .sp .5v
12 .if n .sp
13 ..
14 .de Ip \" List item
15 .br
16 .ie \\n(.$>=3 .ne \\$3
17 .el .ne 3
18 .IP "\\$1" \\$2
19 ..
20 .TH "GIT-PATCH-ID" 1 "" "" ""
21 .SH NAME
22 git-patch-id \- Generate a patch ID.
23 .SH "SYNOPSIS"
24
25
26 git\-patch\-id < <patch>
27
28 .SH "DESCRIPTION"
29
30
31 A "patch ID" is nothing but a SHA1 of the diff associated with a patch, with whitespace and line numbers ignored\&. As such, it's "reasonably stable", but at the same time also reasonably unique, ie two patches that have the same "patch ID" are almost guaranteed to be the same thing\&.
32
33
34 IOW, you can use this thing to look for likely duplicate commits\&.
35
36
37 When dealing with git\-diff\-tree output, it takes advantage of the fact that the patch is prefixed with the object name of the commit, and outputs two 40\-byte hexadecimal string\&. The first string is the patch ID, and the second string is the commit ID\&. This can be used to make a mapping from patch ID to commit ID\&.
38
39 .SH "OPTIONS"
40
41 .TP
42 <patch>
43 The diff to create the ID of\&.
44
45 .SH "AUTHOR"
46
47
48 Written by Linus Torvalds <torvalds@osdl\&.org>
49
50 .SH "DOCUMENTATION"
51
52
53 Documentation by Junio C Hamano and the git\-list <git@vger\&.kernel\&.org>\&.
54
55 .SH "GIT"
56
57
58 Part of the \fBgit\fR(7) suite
59