]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-patch-id.txt
Documentation: be consistent about "git-" versus "git "
[thirdparty/git.git] / Documentation / git-patch-id.txt
CommitLineData
7fc9d69f
JH
1git-patch-id(1)
2===============
3
4NAME
5----
c3f0baac 6git-patch-id - Compute unique ID for a patch
7fc9d69f
JH
7
8SYNOPSIS
9--------
b1889c36 10'git patch-id' < <patch>
7fc9d69f
JH
11
12DESCRIPTION
13-----------
52a22d1e
LAS
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
abda1ef5 16the same time also reasonably unique, i.e., two patches that have the same "patch
52a22d1e 17ID" are almost guaranteed to be the same thing.
7fc9d69f 18
52a22d1e 19IOW, you can use this thing to look for likely duplicate commits.
7fc9d69f 20
a77a9222
JH
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
7fc9d69f
JH
27OPTIONS
28-------
52a22d1e
LAS
29<patch>::
30 The diff to create the ID of.
7fc9d69f
JH
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---
9e1f0a85 42Part of the linkgit:git[1] suite