]>
Commit | Line | Data |
---|---|---|
7fc9d69f JH |
1 | git-patch-id(1) |
2 | =============== | |
3 | ||
4 | NAME | |
5 | ---- | |
c3f0baac | 6 | git-patch-id - Compute unique ID for a patch |
7fc9d69f JH |
7 | |
8 | SYNOPSIS | |
9 | -------- | |
7791a1d9 | 10 | [verse] |
b1889c36 | 11 | 'git patch-id' < <patch> |
7fc9d69f JH |
12 | |
13 | DESCRIPTION | |
14 | ----------- | |
52a22d1e LAS |
15 | A "patch ID" is nothing but a SHA1 of the diff associated with a patch, with |
16 | whitespace and line numbers ignored. As such, it's "reasonably stable", but at | |
abda1ef5 | 17 | the same time also reasonably unique, i.e., two patches that have the same "patch |
52a22d1e | 18 | ID" are almost guaranteed to be the same thing. |
7fc9d69f | 19 | |
52a22d1e | 20 | IOW, you can use this thing to look for likely duplicate commits. |
7fc9d69f | 21 | |
0b444cdb | 22 | When dealing with 'git diff-tree' output, it takes advantage of |
a77a9222 | 23 | the fact that the patch is prefixed with the object name of the |
4fa535a1 | 24 | commit, and outputs two 40-byte hexadecimal strings. The first |
a77a9222 JH |
25 | string is the patch ID, and the second string is the commit ID. |
26 | This can be used to make a mapping from patch ID to commit ID. | |
27 | ||
7fc9d69f JH |
28 | OPTIONS |
29 | ------- | |
52a22d1e LAS |
30 | <patch>:: |
31 | The diff to create the ID of. | |
7fc9d69f | 32 | |
7fc9d69f JH |
33 | GIT |
34 | --- | |
9e1f0a85 | 35 | Part of the linkgit:git[1] suite |